Question

To submit this assignment Online, copy and paste your code as well as the output window here Q3. Write a program to print the

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

Here first loop for(i=1;i<=7;i++) is used to display number of rows (7 rows so 1-7 in loop)

Inner loop is used to print the elements. Here elements are numbers from 1 to i value.

code:

#include <stdio.h>
int main()
{
   int i,j;
   for(i=1;i<=7;i++)
   {
       for(j=1;j<=i;++j)
           printf("%d",j); // printing elements of one row
       printf("\n");// to go to new line
       }
   return 0;


}

CAProgram Files (x86)\Dev-CpplConsolePauser.exe 12 123 1234 12345 123456 1234567 Process exited normally. Press any key to co

If any problem in understanding please comment below.

Add a comment
Know the answer?
Add Answer to:
To submit this assignment Online, copy and paste your code as well as the output window...
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
  • Qu6 (Online) (20 May. Chapter Sections 14) - Monilla Firefox Quito (Online) (20 May, Chapt X...

    Qu6 (Online) (20 May. Chapter Sections 14) - Monilla Firefox Quito (Online) (20 May, Chapt X C Question 20: A Sample Of A X mheducation.com m Getting Started M McGraw-Hill Connect Lecture Notes Prof. D.. C Get Homework Help.... © Google YouTube https://www.webassig... - 1300s in the following question gas cylinders, The aders we use to cook food in our kitchens contain butane (Culto) gas. Butane reacts with oxygen of ais produce heat as shown below: 2C, H 0 (g)...

  • Aspirin can be made in the laboratory by reacting acetic anhydride (C,HeOs) with salicylic acid (CHeO3)...

    Aspirin can be made in the laboratory by reacting acetic anhydride (C,HeOs) with salicylic acid (CHeO3) to form aspirin (Co Hg 04) and acetic acid (C2H4O2). The balanced equation is CAHeOs+CHeOs CoHsO+CHO In a laboratory synthesis, a student begins with 2.90 mL of acetic anhydride (density salicylic acid Once the reaction is complete, the student collects 1.24 g of aspirin Detemine the limiting reactant for the reaction acetic anhydride =1.08 g/ml) and 1.23 g of salicylic acid Request Answer Submit...

  • How do you copy/store a value from the output? TI-89 Titanium やTEXAS INSTRUMENTS "21.1340394532 =4.20393183:78E" =.644998616188...

    How do you copy/store a value from the output? TI-89 Titanium やTEXAS INSTRUMENTS "21.1340394532 =4.20393183:78E" =.644998616188 2 59 e1.hat 61 p2 hat 3 F-hat "970079787234 =.860352422907 2766. =1504. 69 n2 MAIN DEG HUTD FUNC 26 F6 Y= F7 WINDOW 8 GRAPH TBLSET TABLE F F1 F2 F3 F4 F5 COPY QUIT PASTE 2ND ESC A-LOCK ALPHA APPS

  • mathlab please copy and paste the code and output Q1. (50 points) Consider the following mathematical...

    mathlab please copy and paste the code and output Q1. (50 points) Consider the following mathematical sequence for any mumber fathe sequence, the first number is 1 = 0. The remaining terms are computed via the following method. The second number of the sequence is given by 1 /2 f iseve Ty - 3x + 1 if, is add The third number of the sequence is given by 1 /2 fils even 133ry + 1 ifr, is odd Thus, the...

  • Copy/Paste your script from 5b here. 4. Let's look at a more complicated script executable. a....

    Copy/Paste your script from 5b here. 4. Let's look at a more complicated script executable. a. Write the following as script6.sh and change its permissions to count for num in d do if num eq 100 then count (count+1) done echo The number 10 was found $count times What is the output? Run the script as ./script6.sh 10 20 30 10 40 20 50 10 60 <enter Summarize what the script does r using the read command. The following script...

  • This assignment tests your ability to write C programs that handle keyboard input, formatted console output,...

    This assignment tests your ability to write C programs that handle keyboard input, formatted console output, and input/output with text files. The program also requires that you use ctype functions to deal with the logic. In this program, you will input from the user two characters, which should both be letters where the second letter > the first letter. You will then input a file character-by-character and output those letters that fall between the two characters (inclusively) to an output...

  • This assignment is designed to give you practice with Javadoc, creating unit tests and using Junit....

    This assignment is designed to give you practice with Javadoc, creating unit tests and using Junit. Be sure to follow all style and documentation requirements for THIS class. See the style and documentation requirements posted on Canvas. You are to name your package assign1 and your file Palindrome.java. Palindrome Class Palindrome testString : String + Palindrome (String) + isPalindrome (): boolean The method isPalindrome is to determine if a string is a palindrome. A palindrome, for this assignment, is defined...

  • Project 8 – Populating a struct and saving it. This is another “switch” assignment. Rather like...

    Project 8 – Populating a struct and saving it. This is another “switch” assignment. Rather like the scenarios, here you must select someone else's posted .h file, post a claim, and using it, codepopulating their struct with values you choose. Here “populate” means to give each member a value, using assignment operators and strcpy ( ) as needed. This all assumes you completed Project 7 first! You can't skip ahead on this one. I populated the Cat fluffy in my...

  • Put all of your SQL code in a file named grades.sql and submit it below. Download...

    Put all of your SQL code in a file named grades.sql and submit it below. Download the starter code, which contains import_grades.sql and the grades.csv file. Using he import_grades, sql file, create your database and table. - 0 eded. 1 T Une Modify the LOAD DATA INFILE to correct the path to load the grades.csv file, and add/remove LOCAL he only modification you may make to the import_grades.sql or the grades.csv files. The data represents grades for assignments in a...

  • Assignment Overview This programming assignment is intended to demonstrate your knowledge of the following:  Writing...

    Assignment Overview This programming assignment is intended to demonstrate your knowledge of the following:  Writing a while loop  Writing a for loop  Writing a while loop with a sentinel value Chocolate Coupons Foothill Fro-cho, LLC, gives customers a coupon every time they purchase a chocolate bar. After they earn a certain number of coupons, they qualify for a free chocolate bar, which they may use toward the purchase of a single chocolate bar. Usually, 7 is the...

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
Active Questions
ADVERTISEMENT