Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

how to draw many pattern in c using loop

+1 vote
asked Jan 23, 2020 by Bishal (130 points)

2 Answers

0 votes
answered Jan 28, 2020 by krishna gudpalle (140 points)
for drawing pattern you have to use nested loops by this we can make tabular structure with rows and columns

in nested loop outer loop will represent rows while inner row represent no of columns .

ex:- for (int i=0;i<5;i++){

               for(int j=0;j<=3;j++{

                         cout <<"*";      //here it will print * in coloms i.e  **** in this direction->

}

cout <<endl;    // here it will break the line and prints ****in next line in

}

 final output will be

****

****

****

****
0 votes
answered Jan 31, 2020 by bhoomi2000 (780 points)
we can make different pattern with the help of nested loops.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...