How to write a C Program to generate specific formats in C Programming Language ?
Solution:
#include<stdio.h>
void main()
{
int r, s, n;
printf("\nEnter the Value of n : ");
scanf("%d", &n);
for(r = 1; r <= n; r++)
{
for(s = 1; s <= r; s++)
printf("*");
printf("\n");
}
}
Learn More :
Format
Generate
- How To Write a C program that generates two random numbers ?
- C program generates a random number and uses an algorithm to generate 9 other numbers.
- C Program Generates 10 Random Integers Between 0 and 99.
- C Program To Generating Fibonacci Series Using Recursion
- C Program To Generate Multiplication Table
- Write a c program to accept a string from user & generate following pattern (e.g, input "abcd")
- ACLK (32768 Hz) to generate a one second timer and toggles an LED