0

Help me i wanna print hollow triangle

For loop in c https://code.sololearn.com/c8U9jh0tkf9K/?ref=app

31st Mar 2020, 11:18 AM
Suleman Ahmad
Suleman Ahmad - avatar
5 ответов
+ 2
Sorry
31st Mar 2020, 11:32 AM
Sohanur Rahman
Sohanur Rahman - avatar
+ 1
Write hollow triangle in between printf(" ");
31st Mar 2020, 11:25 AM
Sohanur Rahman
Sohanur Rahman - avatar
+ 1
Coded_cat change line 20 to if(i==5||j==0||i==j) and line 23 to Printf(" ") change for loop test conditions to i<5 and j<5
31st Mar 2020, 11:36 AM
Nandan
Nandan - avatar
+ 1
try this. #include <stdio.h> int main() { for (int i = 0; i <= 4; i++) { if (i == 4) for (int k = 0; k <= i; k++) printf("@"); else printf("@"); for (int j = 1; j <= 3; j++) { if (i == j) printf("@"); else printf(" "); } printf("\n"); } return 0; }
31st Mar 2020, 11:42 AM
John Robotane
John Robotane - avatar
0
Hahah that's not what i want Sohanur Rahman look at the code first
31st Mar 2020, 11:30 AM
Suleman Ahmad
Suleman Ahmad - avatar