Printing Pattern Using Loops - HackerRank
Printing Pattern Using Loops - HackerRank
Prepare C Conditionals and Loops Printing Pattern Using Loops Exit Full Screen View
4 #include <stdlib.h>
5
4 4 4 4 4 4 4
6 int main()
4 3 3 3 3 3 4
7 {
4 3 2 2 2 3 4
8
4 3 2 1 2 3 4
4 3 2 2 Pattern
2 3 4
9 int n;
Your Printing Using Loops submission
10 got 30.00 points. &n);
scanf("%d", Share Tweet
4 3 3 3 3 3 4
11 int m= 2*n - 1;
4You
4 4are
4 4 now
4 4 285 points away from the gold level for your c badge.
Submissions
21 return 0;
Sample Input 0 22 }
Line: 10 Col: 21
2
2 2 2
Discussions
2 1 2
2 2 2
You have earned 30.00 points!
You are now 285 points away from the gold level for your c badge.
Sample Input 1
5% 215/500
Sample Output 1
5
5
5
4
5
4
5
4
5
4
5
4
5
4
5 5
4 5
Congratulations
5 4 3 3 3 3 3 4 5 You solved this challenge. Would you like to Next Challenge
5 4 3 2 2 2 3 4 5 challenge your friends?
5 4 3 2 1 2 3 4 5
5 4 3 2 2 2 3 4 5
5 4 3 3 3 3 3 4 5
5 4 4 4 4 4 4 4Blog
5 | Scoring | Environment | FAQ | About Us | Support | Careers | Terms Of Service | Privacy Policy
5 5 5 5 5 5 5 5 5