fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. srand((unsigned)time(NULL));
  5. int number;
  6. int x1 = rand() % 100 + 1;
  7. int x2 = rand() % 100 + 1;
  8.  
  9. printf("Proizvoditsya vicheslenie\n");
  10.  
  11. number = x1 * x2;
  12. printf("Umnojenie\n |===================|\n");
  13. printf(" %d * %d = %d\n", x1, x2, number);
  14.  
  15. number = x1 / x2;
  16. printf("Delenie\n |===================|\n");
  17. printf(" %.d / %.d = %d\n", x1, x2, number);
  18.  
  19. number = x1 + x2;
  20. printf("Slojenie\n |===================|\n");
  21. printf(" %d + %d = %d\n", x1, x2, number);
  22.  
  23. number = x1 - x2;
  24. printf("Vichitanie\n |===================|\n");
  25. printf(" %d - %d = %d\n", x1, x2, number);
  26. return 0;
  27. }
  28.  
Success #stdin #stdout 0s 2112KB
stdin
Standard input is empty
stdout
Proizvoditsya vicheslenie
Umnojenie
 |===================|
     47 * 44 = 2068
Delenie
 |===================|
     47 / 44 = 1
Slojenie
 |===================|
     47 + 44 = 91
Vichitanie
 |===================|
     47 - 44 = 3