/* Print 1 to 10 using while loop */
#include<stdio.h>
int main()
{
int i=1;
while(i <= 10)
{
printf("%d\n",i);
i++;
}
return 0;
}
---------------------------------------------
/* Print 1 to 10 using for loop */
#include<stdio.h>
int main()
{
int i;
for(i=1;i<=10;i++)
printf("%d\n",i);
return 0; }
how to print 1 to n using while loop
ReplyDeleteQ1. Write a program to read 10 numbers and compute the average, maximum and minimum values
ReplyDeleteQ2. Write a program to read in numbers until the number -999 is encountered. The sum of all number read until this point should be printed out.
WAP on the given conditions:
ReplyDeleteA financial institution provides following incentive policy for its customer for the deposit:
a) for deposit of Rs. 5000 or above and time 2 years or above interest rate is 4%
b) for deposit of Rs. 5000 or above and time less than 2 years interest rate is 3%
c) on deposit below Rs. 5000 interest rate is 2% regardless of the period of the deposit
help full tutorials uses of c language
ReplyDeleteThanks For this Article.This is very helpful for me.Students who need more information about this topics, They can checkout Maxlearners for free.
ReplyDelete