How To Print Given Star Pattern.
What will be the solution of given star pattern? Fig:- 1 This program is executed on DEV C++ editor. You may use any C or C++ editor to execute the program logic will be same. Step that you have to follow for this programming logic. Step 1:- We have to draw a box which will contain 5 rows and 5 column. Fig:-2 Step 2:- We have drawn a box with rows and 5 columns. Now we have to think about its logic portion. Logic for printing star:- If column is smaller then or equal to 5 - row then only we have to print star. Other wise print blank space. Programming:- #include<stdio.h> #include<conio.h> int main() { int row,col; //Variable deceleration for (row=0;row<=4;row++) //Loop for rows { for (col=0;col<=4;col++) //Loop for column { if (col>=(4-row)) //Condition for printing star { printf(" *"); } else ...