Program to print table of Given No. & find Sum.

#include<stdio.h>
#include<conio.h>
void main()
{
   int i,res,num,sum=0;
   clrscr();
   printf("\nEnter Number");
   scanf("%d",&num);
   for(i=1;i<=10;i++)
     {
     res=num*i;
     sum=sum+res;
     printf("\n\n%d",res);
     }
   printf("\nSum is%d",sum);
   getch();
}

Leave a Reply