Wednesday, October 5, 2016

C Tutorial 5- Find modulous of two numbers

#include<stdio.h>
main()
{
int a,b,sum;
printf("Enter a such that a>b:\n" );//10
scanf("%d",&a);
printf("Enter b such that b<a:\n");//3
scanf("%d",&b);
printf("The mod of %d and %d is = %d \n \n",a,b,(a%b) );//1
}

Output

No comments:

Post a Comment