Thursday, 2 January 2014

Multiples

A program that tells Multiples of any number.

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int x,y,div;
    printf("\t\t\tX is a multiple of Y or not\nEnter value of x:");
    scanf("%d",&x);
    printf("Enter value of y:");
    scanf("%d",&y);

    if(y%x==0)
    {printf("True");}
    else
    {printf("False");}


    return 0;
}

No comments:

Post a Comment