You have to explain these instructions below with respect to the Type Systems and Type Expressions:
int number=5, d;
float m=25.5;
d=m/number;
if(number %d==0)
printf(“Divisible”);
else if(m%d)
printf(“Non-Divisible”);
else
printf(“Wrong program!”);
#include<stdio.h>
int main(){
int number=5, d; //Value of d is to be entered
float m=25.5;
scanf("%d", &d);
d=m/number;
if(number %d==0){
printf("Divisible");
}
else if(m%d==0){
printf("Divisible");
}
else{
printf("Wrong program!");
}
}
Comments
Leave a comment