Posts

Showing posts from December, 2022

Write a program to print a sentence many times using while loop in C programming.

Image
       C PROGRAM TO PRINT A SENTENCE                                      MANY TIMES Syntax: while(condition) {     body;    i++; } Program:- #include<stdio.h> int main() { int i=1,n;         printf("Enter the number of times you have to print:);         scanf("%d",&n); while(i<=n) { printf("I am good\n"); i++; } return 0; } OUTPUT:-  Enter the number of times you have to print:5                     I am good                     I am good                     I am good                     I am good                     I am good Thank you...