Computer Science, asked by sudeshnanandysaha, 5 hours ago

write a programme to enter two numbers. Divide the first number by the second number and print the result, only if the second number is not zero ​

Answers

Answered by soumyadip2035
0

Answer:

#include <stdio.h>

#include <math.h>

int main()

{

int a, b;

float div;

printf("Enter the value of a:\n");

scanf ("%d", & a);

printf("Enter the value of b:\n");

scanf ("%d", & b);

div=(float)a/b;

if(b!=0 ){

printf("Division of %d / %d is %.2f \n", a, b,div);

}

if(b==0 ){

printf("Division by 0 not possible");

}

return 0;

}

Similar questions