Thursday

Write a C program to print 10 terms of any series using FOR loop

#include<stdio.h>
#include<conio.h>
void main()
  {
    int n,i,a=5;
    clrscr();
    printf("\n Enter how many numbers?");
    scanf("%d",&n);
    for(i=0;i<n;i++)
     {
      printf("%d\t",a);
      a=a+5;
    }

  getch();
  }

No comments:

Post a Comment

Rahul-Notes