Can someone explain the code in details? (C programming language) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can someone explain the code in details? (C programming language)

#include <stdio.h> int main () { int i, j, n ; printf("Enter a number\n"); scanf("%d", &n); for (i = 0; i < n; i++){ for (j = 0; j < i + 1 ; j++){ printf("*"); } printf("\n"); } return 0; }

13th Aug 2023, 8:55 AM
Raphy Rahman Alauddin
Raphy Rahman Alauddin - avatar
1 Answer
+ 8
Raphy Rahman Alauddin This code prompts the user to enter a number and prints a pattern in the shape of a right-angled triangle, with the number of asterisks in each row increasing based on the user's input. See the details.. https://code.sololearn.com/cNiSIm8FFQzK/?ref=app
13th Aug 2023, 9:49 AM
Darpan kesharwani🇮🇳[Inactive📚]
Darpan kesharwani🇮🇳[Inactive📚] - avatar