Write a program to generate the given pattern. CCCCCC CCSSCC SSSSSS SSSSSS KKSSKK KKKKKK

Answers

Answer 1

Answer:

#include <stdio.h>

int main()

{

   int i, j;

   

   for(i=1; i<=6; i++)

   {

       for(j=1; j<=6; j++)

       {

           if(i==1 || i==6)

           {

               printf("C");

           }

           else if(i==2 || i==5)

           {

               if(j==1 || j==6)

                   printf("K");

               else

                   printf("S");

           }

           else

           {

               printf("S");

           }

       }

       printf("\n");

   }

   return 0;

}


Related Questions

10.2. Is the variance favorable or unfavorable? TRUE FALSE items TRUE 1. Goods in transit & goods on consignment are the same, 2. Gross profit is the difference between net sales & cost of goods sold. 3. Purchase records end up with paying the voucher. 4. Payment for janitors & clerks is calculated under direct labor. TRUE 5. Variance is the deviation between actual cost & standard cost.​

Answers

Answer:

The statement "Variance is the deviation between actual cost & standard cost" is true.

The statement "Goods in transit & goods on consignment are the same" is false.

The statement "Gross profit is the difference between net sales & cost of goods sold" is true.

The statement "Purchase records end up with paying the voucher" is true, as purchase records are used to create invoices and payment vouchers.

The statement "Payment for janitors & clerks is calculated under direct labor" is false, as payment for janitors and clerks is typically categorized under indirect labor.

Therefore, there are 3 true statements and 2 false statements.

Explanation:

A STUDENT IS GRADED BASED ON EXAM PERFORMANCE AND CLASS ATTENDANCE.WHEN THE PERFORMANCE IS ABOVE 50% AND CLASS ATTENDANCE GREATER THAN 75%,THE STUDENT IS AWARDED "PASS".WHEN THE CLASS ATTENDANCE IS LESS THAN 75%,THE STUDENT RETAKES THE COURSE.OTHERWISE,THE SITS FOR A SUPPLEMENTARY EXAM.DRAW A PROGRAM FLOWCHART TO REPRESENT THIS LOGIC​

Answers

Here is a flowchart to represent the logic described:

The Flowchart

START

|

v

ENTER exam performance and class attendance

|

v

IF performance > 50 AND attendance > 75 THEN

|

v

DISPLAY "PASS"

|

v

ELSE IF attendance < 75 THEN

|

v

DISPLAY "RETAKE COURSE"

|

v

ELSE

|

v

DISPLAY "SUPPLEMENTARY EXAM"

|

v

END

Using symbols, flow charts depict the connections between input, processes, and output.

The planned structure of a program is analyzed by computer programmers using flow charts to ensure that all inputs, processes, and outputs have been considered and that all defects have been fixed. Flow charts are used to communicate ideas to stakeholders.

Read more about flowcharts here:

https://brainly.com/question/6532130

#SPJ1

What is the output?
listD= ['cat', 'fish', 'red', 'blue']
print(listD[2])
There is no output because there is an error in the program.
cat.
fish
red
blue

Answers

Note that the output of the code is: "Red" (Option C)

What is the rationale for the above response?

The above is true because the code defines a list listD with four elements, and then uses the square bracket notation to print the third element of the list (Python indexing starts at 0). Therefore, the print(listD[2]) statement prints the string 'red'.

Python indexing is the method of accessing individual items or elements in a sequence, such as a string, list, or tuple. In Python, indexing starts at 0, which means that the first item in a sequence has an index of 0, the second item has an index of 1, and so on.

Learn more about code at:

https://brainly.com/question/30429605

#SPJ1

A movie theater only keeps a percentage of the revenue earned from ticket sales. The remainder goes to the distributor.

Write a program that calculates a theater's gross and net box office profit for a single night.
The program should ask for the name of the movie, and how many adult and child tickets were sold.

The price of a ticket is $6.00, and a child ticket is $3.00. Also, the theater keeps 20 percent of the gross box office profit and rest goes to the Distributor.
(Python)

Answers

A program that calculates a theater's gross and net box office profit for a single night is given below -

What is program?

A program is a set of instructions that tell a computer what to do in order to achieve a desired outcome. Programs are written in a specific language that the computer can understand and use to carry out the instructions. These instructions can range from performing simple calculations to complex tasks such as creating a website or game.

A program that calculates a theater's gross and net box office profit for a single night are:

movie_name = input('What is the name of the movie? ')

number_of_adult_tickets = int(input('How many adult tickets were sold? '))

number_of_child_tickets = int(input('How many child tickets were sold? '))

gross_box_office_profit = (6.00 * number_of_adult_tickets) + (3.00 * number_of_child_tickets)

net_box_office_profit = gross_box_office_profit * 0.20

print('Movie: ', movie_name)

print('Gross Box Office Profit: $', gross_box_office_profit)

print('Net Box Office Profit: $', net_box_office_profit)

To learn more about program

brainly.com/question/23275071

#SPJ1

Arithmetic Instructions on
Hardcode a 3 digit value into a variable. Display the number

An extra code that might help
section .data
hello: db 'Hello world!',10 ; 'Hello world!' plus a linefeed character
helloLen: equ $-hello ; Length of the 'Hello world!' string

section .bss
num: resb 1
q: resb 1
r: resb 1

section .text
global _start

_start:

mov [num],byte 34

mov ax,[num]
mov bl,10
div bl

add al,'0';
mov [q], al
add ah,'0';
mov [r], ah

mov eax,4
mov ebx,1
mov ecx,q
mov edx,1
int 80h

mov eax,4
mov ebx,1
mov ecx,r
mov edx,1
int 80h


mov eax,1
mov ebx,0
int 80h;

Answers

Name of the variable is hello. Its length is the  numeric constant 13. 12 + 1 for the linefeed. Stored in helloLen variable.

What is variable?

In a computer programme, information is stored in variables so that it may be accessed and changed. They also give us a means to give data a name that is descriptive, making it easier for us and the reader to understand our programmes.

It can be useful to conceive of variables as data storage units. They exist only to label and keep data in memory. Your software can then make use of this data.

.data

 hello2: db 'Hello World! G',10

 helloLen2: equ $-hello2

and in main

   int 80h;

   mov edx,helloLen2

Use the below option to generate a listing file, the hex values will display the length, look for the mov,edx,length_Var instruction line on the right hand side (RHS).

nasm -f elf myfile.asm -l myfile.lst

Learn more about variable

https://brainly.com/question/13437928

#SPJ1

Other Questions
Destiny Rubio Definite Integrals of Rational Functions Feb 23, 11:55:41 AM Find the average value of the function f(x)=(12)/(x-10) from x=1 to x=7. Express your answer as a constant times ln3. Answer: ln3 Submit Answer Let k be a field. Show that I = {p(x) k[x] : p(0) =0} is an ideal of k[x] andthat it is a principle ideal. Asci can be dissected and carefully sorted for an analysis to determine the order of the meiotic products, but you can also dissect them quickly without worrying about the order of the products.Suppose that you do an unordered ascus analysis of the two Saccharomyces cerevisiae loci, bat and hum.You observed 52 tetratypes and 10 nonparental ditypes out of a total of 400 asci.The loci bat and hum are linked at a distance of:...a)4.5 m.u.b)7.75 m.u.c)9 m.u.d)15.5 m.u.e)18 m.u. Please can someone explain this question its urgentThe Holocaust is a crime without a language because Listen to the audio and circle the correct word.1. Laura could see an alien / a ghest last night.2. Andrea could perceive the energy / death of a person.3. Laura can have visions / beliefs about the future.4. Charles and Derek could see something floating / frightening in the ait5. Theodore could not exolain the frightening / appantion experience. Richard buys, fixes, resells small devices, like the Mir487, which consistently needs a transistor replaced. He can buy the transistor for $10.13 and a broken Mir487 for $29.87. Once fixed, he resells the new Mir487 for $259.93. Approximately how much profit will Richard make if he resells 30 Mir487 devices?A. $7,200.00B. $7,440.00C. $6,600.00D. $8,160.00 whylysol is less resistant to E.coli than isopropyl alcohol?whychlorhexidine is more resistant than alcohol with S.aureus ? What about the song "Blowin' in the Wind" by Bob Dylan contributed to his mood? A 6.00-kg block is sent up a ramp inclined at an angle =27.0 from the horizontal. It is given an initial velocity 0=15.0 m/s up the ramp. Between the block and the ramp, the coefficient of kinetic friction is k=0.40 and the coefficient of static friction is s=0.70.What distance along the ramp's surface does the block travel before it comes to a stop? Find the common ratio of a geometric sequence, whose first term is 2 and the third term is 242. mass of 8 kg is accelerating at 5 msDetermine the resultant force that causes the acceleration. Compare the meaning of complacency to contentment Does the poem "Sea-fever" suggest that people always find the things they seek? Justify your answer. KARIM buys 1000 shares of Unilever at $80 per share on margin. The initial margin requirement is 70%, and the maintenance margin is 24%.What is the Actual margin if the price drops to $69? * (NOTE: WRITE DOWN YOUR ANSWER IN PERCENTAGE VALUE WITH 2 DECIMAL POINT) 2 pointsCalculate the Margin call price per share for karim. * (NOTE: WRITE DOWN YOUR ANSWER WITH 2 DECIMAL POINT) 2 points #ARO SPACE GROUP Short sells 200 shares of a stock for $20 per share. The initial margin is 50%, and the maintenance margin is 30%. IF price of the stock raise to $22 per share., what is the margin rate? *(NOTE: WRITE DOWN YOUR ANSWER IN PERCENTAGE VALUE WITH 2 DECIMAL POINT) 3 pointsWill there be a margin call for ARO SPACE GROUP, if price of the stock price raise to $25 per share. (Yes fall in margin call or no, explain briefly ) 1 point You have been appointed policy advisor of the country Economia. The country is an open economy, has a floating exchange rate regime and uses the Econ as its currency. The government is trying to understand the effect of the following shocks on the exchange rate (????????co????/????), the home and foreign price level and real money balances.Use the fundamental equation of the monetary approach to advise the government on the effect of each of these shocks.a. A decrease in foreign money supplyb. An increase in home real incomec. A decrease in the home nominal interest rated. A decrease in the foreign nominal interest rate Explain the idea of balanced muscle workouts. Provide example exercises. Which loop prints the numbers 1, 3, 5, 7, , 99?\c = 1while (c Martina spent a total of $15 at the grocery store. Of this amount, she spent $12 on fruit. What percentage of the total did she spend on fruit? Honest opinion only:-Do you think Marine Pollution is a big problem in your community?-How do you view it? Suppose that you put 2 dimes, 2 nickels, and 1 penny into a bag. a coin will be drawn from the bag and replaced 175 times. what is a reasonable prediction for the number of times a dime will be drawn?