Posts

Showing posts with the label Alphabets star pattern.

How To Print Alphabet E in Star Pattern

Image
What will be the solution for the given star pattern? Fig:-1 This program is executed on DEV C++ editor. You may choose any C or C++ editor to execute the program logic and programming will be same for all. For printing the above star pattern follows the step mentioned below. Step 1:- Draw a box of 4 column and 5 row. And insert star in such way that is form alphabet E as given in fig:-2 Fig :-2 Step 2:- Now we have divided fig :-2 in two part so that we can easily write the code. Fig :-3 Step 3:- Now time for logic part if you will see in fig :-3 part 1 then you will find that figure is like rectangle with one side open. 1st part logic:- if row =0 or row =4 or column = 0 then only print star. 2nd part logic:- if row = 2 and column % 3 != 0  then only print star. These are the 2 condition when we have to print star otherwise we have to print blank space. No time for programming. Programming #include<stdio.h> #include<conio.h> int main() { int row, col;    ...

How To Print Alphabet D in Star Pattern

Image
What will be the solution of given star pattern ? Fig:-1 This programming is executed on DEV C++ editor. You may choose any C or C++ editor to execute the program. Logic and the programming will be same. For printing above star pattern follow the step mention below. Step 1:- Draw a box of 4 column and 5 row.  In fig 2 I have inserted star in such a way that it form the D. Fig:-2 Step 2:-  It is same like  star pattern of alphabets C   but in this we have divided it into three part and figure are as follows. Fig :-3 Step 3:- Now we have divided it into three part and we have to write its logic for the programming. 1st part logic:- If column = 0  then only we have to print star. 2nd part logic:- If row = 0 or row =4 and column % 3!= 0  then we have to print star. 3rd part logic:- If column =3 but row != 0 and row !=4 then we have to print star. These are the 3 condition where we have to print star and rest place we have print the blank space. Now the programm...

How To Print Alphabet C in star pattern ?

Image
What will be the solution of the given star pattern? Fig:-1 This program is executed on DEV C++ editor. You may choose any type of C or C++ editor to execute the program. This program will be same for every editor. For the printing the star pattern follow the steps as mentioned below. Step 1:- I have drawn a box of 3 Column and 5 Rows. I have inserted star in such a way that it can form alphabet C.  Fig:-2 Step 2:-   Now see in the fig 2. We can divide the star pattern in two parts 1st part for 0th row and 4th row  and 2nd part as 0th column.  Fig:- 3 Step 3:-   We have to write the condition for the 1st part and the second part. Now condition for 1st part. If row = 0 or row =4 and column != 0     (! => Not symbol ) then only we have to print star. Now for the 2nd part. If column = 0 and row != 0 or row != 4    (! => Not symbol ) then only we have to print star. This is 2 condition on which execution we will have to print...

How To Print Alphabet B in Star Pattern.

Image
What will be the solution of given star pattern? Fig : 1 This program is executed on DEV C++ editor . You may choose any C or C++ editor. It will be same for any editor. For printing star pattern we have to follow some steps. Step 1:- I have created a box of 4 columns and 7 rows. and insert  star in box as like they can form alphabets B. In the given fig: 2 Fig:2 Step 2:- Now you have to find the for printing star. So first we look at column 0. This column is full of star.And if we look at row 0, 3,and 6. then they have same pattern till column 2 . So we can write 2 different condition for this start pattern.  If column = 0 and row must be between 1 and 5. Then only we have to print star. Step 3:-   Now we have to print star in row 0, 3, and 6 and up to column 2.  If column is smaller then equal to 2 and row module 3 is equal to 0. Then only we have to print star.     Step 4:- Now we have completed our star pattern up ...

How to print alphabet A in star pattern.

Image
What will be the solution of the given problem?                                                                                                      Fig:1 This program is executed on DEV C++ editor. You may choose any C or C++ editor to execute the program it will not be same for all editor. For printing this star pattern you have to follow some steps. Step 1:-   I have created a table of  5 rows and 4 column. And inserted the following star pattern to form alphabet A . In the given figure. Fig:-2 Step 2:- Now we have to find the condition for the printing star. In 1st line we have two star means in Row 0 and we have two star in column 1 & 2. For this we have condition.   If Row = 0 a...