Saturday, 26 September 2015

Program to find whether is multiple of 7 up to 100

/*Program to find whether is multiple of 7 up to 100*/
#include<conio.h>
#include<stdio.h>
void main()
{
int n;
clrscr();
printf("Enter number of terms:");
scanf("%d",&n);
for(int i=1;i<=n;i++)
{
if(i%7==0)
printf("%d ",i);
}
getch();
}

/*Program to find table of a given number*/
#include<conio.h>
#include<stdio.h>
void main()
{
int n,s;
clrscr();
printf("Enter any number :");
scanf("%d",&n);
for(int i=1;i<=10;i++)
{
s=i*n;
printf("%d x %d=%d\n",n,i,s);
}
getch();

}


No comments:

Post a Comment