c programs coding compile by mingW
Monday, 7 January 2013
Write a C code which takes two inputs X and Y, and displays “True” If number X is a multiple of number Y, and displays “False” otherwise
#include<stdio.h>
void main ()
{
int x,y;
printf("enter value of X:");
scanf("%d",&x);
printf("enter value of Y:");
scanf("%d",&y);
if(x%y==0)
{printf("true");
}
else
{printf("false");
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment