3. WRITE A PROGRAMME TO PRINT THE FOLLOWING PATTERN
*
**
***
****
Answers
Answered by
1
Answer:
Explanation:
#include <stdio.h>
int main() {
int i, j, rows;
printf("Enter the number of rows: ");
scanf("%d", &rows);
for (i = 1; i <= rows; ++i) {
for (j = 1; j <= i; ++j) {
printf("* ");
}
printf("\n");
}
return 0;
}
Answered by
1
Answer:
This program which I have written is for Java..
Explanation:
public class pattern
{
public static void main()
{
System.out.println("/u000c");//clears screen
System.out.println("*");
System.out.println("**");
System.out.println("***");
System.out.println("****");
}//class ends
}//main ends
Hope this helps...
Pls mark me Brainliest and follow me for more answers with explanation..
Similar questions