New course! Every coder should learn Generative AI!
Try a free lesson0
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; }
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