Answer to Question #276923 in C for Joy

Question #276923

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!”);

1
Expert's answer
2021-12-07T20:57:50-0500
#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!");
}






















}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS