Question

Write a C Program that print out 10 lines of code to the screen to explain...

Write a C Program that print out 10 lines of code to the screen to explain what you have learned this C Programming Class. You are to decide on the program name.


just write a c program that prints out 10 lines

can be either nunbers or letters

0 0
Add a comment Improve this question Transcribed image text
Answer #1

#include <stdio.h>

int main()
{
//variable declaration
int A, B;
//variable initialization
A = 20;
B = 10;
//display message on computer screen
printf("Start Program\n");
//display message on computer screen
printf("\nA is an integer variable:");
printf("\nA = %d", A);
//display message on computer screen
printf("\nB is an integer variable:");
printf("\nB = %d", B);
//display message on computer screen
printf("\nThe sum of integer variable A and B is: ");
printf("\nA + B = %d", A + B);
//display message on computer screen
printf("\nThe multiplication of integer variable A and B is: ");
printf("\nA * B = %d", A * B);
//display message on computer screen
printf("\nThe division of integer variable A by B is: ");
printf("\nA / B = %d", A / B);
//display message on computer screen
printf("\n\nEnd Program");
return 0;
}

OUTPUT:

Add a comment
Know the answer?
Add Answer to:
Write a C Program that print out 10 lines of code to the screen to explain...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a program that prints the following pattern to the screen. (no blank lines between lines)...

    Write a program that prints the following pattern to the screen. (no blank lines between lines) You must use nested for loops. 1 212 32123 4321234 543212345 c++

  • Write a code in Python to print the following lines on the screen. Submit your code...

    Write a code in Python to print the following lines on the screen. Submit your code here, when it is completed. This is my first real project in Python. It seems very interesting and I cannot wait to learn more about it!

  • C programming Question1 (a) Write a C program that will print out all command line arguments,...

    C programming Question1 (a) Write a C program that will print out all command line arguments, in reverse order, one per line. Prefix each line with its index. 6 marks] (b) Consider this C code snippet int a- 100 int b- 42; inte p- &a; int q-b; p qi printf ("%d %d\n" ,a,*p); When this code is executed, what numbers will it print? [2 marks] (c) Consider this C program int main(int argc,char argv) char* target- "Apple" char vord[100] printf...

  • 1. Write a program in Easy68K to print out “Hello World” in two lines as Hello...

    1. Write a program in Easy68K to print out “Hello World” in two lines as Hello World Paste your code and screenshot of the output in this file.

  • Prelab Exercises Your task is to write a Java program that will print out the following...

    Prelab Exercises Your task is to write a Java program that will print out the following message (including the row of equal marks): Computer Science, Yes!!!! ========================= An outline of the program is below. Complete it as follows: a. In the documentation at the top, fill in the name of the file the program would be saved in and a brief description of what the program does. b. Add the code for the main method to do the printing. //...

  • please write c programming for this code below. Write a program to print a pattern of...

    please write c programming for this code below. Write a program to print a pattern of numbers separated by spaces for the given number of rows. At the time of execution, the program should print the message on the console as: Enter number of rows For example, if the user gives the input as: Enter number of rows : 4 then the program should print the result as: 232 34543 4567654

  • Write a program (python) that multiplies two hard-coded numbers, then prints the individual numbers out and...

    Write a program (python) that multiplies two hard-coded numbers, then prints the individual numbers out and prints their product out, all on separate lines. You can choose the two numbers that are multiplied together. Make a copy of previous exercise then modify it to print output exactly like this, rather than just the numbers on separate lines: 10 x 7 = 70 Do this using the string.format() function discussed in the lecture.

  • Write a complete C program that inputs a paragraph of text and prints out each unique...

    Write a complete C program that inputs a paragraph of text and prints out each unique letter found in the text along with the number of times it occurred. A sample run of the program is given below. You should input your text from a data file specified on the command line. Your output should be formatted and presented exactly like the sample run (i.e. alphabetized with the exact spacings and output labels). The name of your data file along...

  • WRITE A CODE IN C++ A CLASS WITH MEMBER FUCNTIONS THAT COUNTS THE LINES OF CODE...

    WRITE A CODE IN C++ A CLASS WITH MEMBER FUCNTIONS THAT COUNTS THE LINES OF CODE OF C++ FILE OR TEXT FILE .COMMENTS SHOULD NOT BE COUNTED AND SPACE BETWEEN LINES OF CODE SHOULD BE IGNORED AS WELL. ASK FOR INPUT FROM THE USER IT CAN BE CPP FILE OR TEXT FILE Assignment:Write a program to count lines of code according to your LOC Counting Standard. Notes: -Your program should accept as input the name of a file that contains...

  • in c code please 10 Question 6 The following program should print out the multiplication tables...

    in c code please 10 Question 6 The following program should print out the multiplication tables in reverse, but it is not working correctly. Fix the program so that it prints a times table of digits 1 to 9 (inclusivel. int main() for (int 1-1 ; ) for (int j = "; 1 ; I--) printf("220", 11) > return; Upload Choose a File

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT