Write a program to check whether a number is divisible by 97 or not
// Write a program to check whether a number is divisible by 97 or not#include<stdio.h>
int main(){ int num; printf("enter a number for check\n"); //print the line to console scanf("%d",&num); // take input from user if(num%97 == 0){ // % operator return remainder printf("it is divisible by 97"); // this line is print when output is 0 } else printf("it is not divisible by 97");
return 0;}
Write a program to check whether a number is divisible by 97 or not
// Write a program to check whether a number is divisible by 97 or not
#include<stdio.h>
int main()
{
int num;
printf("enter a number for check\n"); //print the line to console
scanf("%d",&num); // take input from user
if(num%97 == 0){ // % operator return remainder
printf("it is divisible by 97"); // this line is print when output is 0
}
else
printf("it is not divisible by 97");
return 0;
}
Output
enter a number for check
878
it is not divisible by 97
enter a number for check
194
it is divisible by 97
0 Comments