Program:- Write a C Program To print the given pattern.
1
22
333
4444
Program:-
Output:-
22
333
44444
1
22
333
4444
Program:-
- #include <stdio.h>
- void main() {
- for(int i = 1; i < 5; i++) {
- for(int j = 0; j < i; j++) {
- printf("%d", i);
- }
- printf("\n");
- }
- }
Output:-
22
333
44444
No comments:
Post a Comment