Advertisement
Guest User

zasdas

a guest
Jan 22nd, 2018
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.66 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. #define MAX 100
  5. #define MIN 2
  6. #define MIN_Z 30
  7.  
  8.  
  9. int main ( void ){
  10.     int t1 , t2, n, m, z;
  11.  
  12.     if ( scanf ("%d", &t1 ) != 1 && t1 >= MIN ){
  13.         exit ( EXIT_FAILURE );
  14.     }
  15.  
  16.     if ( scanf ("%d", &t2 ) != 1 && t2 <= MAX ){
  17.         exit ( EXIT_FAILURE );
  18.     }
  19.  
  20.     if ( scanf ("%d", &n ) != 1 && n >= MIN  ){
  21.         exit ( EXIT_FAILURE );
  22.     }
  23.  
  24.     if ( scanf ("%d", &m ) != 1 && m <= MAX ){
  25.         exit ( EXIT_FAILURE );
  26.     }
  27.  
  28.     if ( scanf ("%d", &z ) != 1 && z >= MIN && z <= MIN_Z){
  29.         exit ( EXIT_FAILURE );
  30.     }
  31.  
  32.     printf("%d ", ( ( t1 * n ) + ( t2 * m ) ) * 5 );
  33.     return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement