![]() |
VOOZH | about |
There are 2 ways to print continuous character patterns in C i.e:
Input:
rows = 5
Output:
A B C D E F G H I J K L M N O
Below is the C program to print continuous character patterns using character using for loop:
A B C D E F
Time complexity: O(R*R) where R is the given number of rows.
Auxiliary space: O(1), as constant space is being used.
Below is the C program to print continuous character patterns by converting numbers into a character:
A B C D E F G H I J K L M N O
Time complexity: O(R*R) where R is the given number of rows.
Auxiliary space: O(1), as constant space is being used.
The while loops check the condition until the condition is false. If the condition is true then enter into a loop and execute the statements. Below is the C program to print continuous character patterns using character:
A B C D E F G H I J K L M N O
Time complexity: O(R*R) where R is the given number of rows.
Auxiliary space: O(1), as constant space is being used.
Below is the C program to print a continuous character pattern by converting a given number into a character using a while loop:
A B C D E F G H I J K L M N O
Time complexity: O(R*R) where R is the given number of rows.
Auxiliary space: O(1), as constant space is being used.