fork download
  1. #include <stdio.h>
  2.  
  3. // struct Dive
  4. // {
  5. // int num1;
  6.  
  7. // int num2;
  8.  
  9. // float res;
  10. // };
  11.  
  12. // void input(struct Dive *);
  13.  
  14. // int main(void) {
  15. // // your code here
  16. // struct Dive D1;
  17.  
  18. // // scanf("%d %d", &D1.num1, &D1.num2);
  19.  
  20.  
  21.  
  22. // return 0;
  23. // }
  24.  
  25. // void input(struct Dive Dptr[])
  26. // {
  27. // scanf("%d %d", (*Dptr).num1,
  28. // }
  29. int main()
  30. {
  31. int num1, num2;//declaring the varible
  32.  
  33. scanf("%d %d", &num1, &num2);//read num1 and num2 from the user
  34.  
  35. if(num2)
  36. {
  37. printf("%g", num1/num2);
  38. }
  39. else
  40. {
  41. printf("denominator can not be zero");
  42. }
  43.  
  44. return 0;
  45. }
Success #stdin #stdout 0s 5292KB
stdin
5 5
stdout
Standard output is empty