Advertisement
Guest User

ramil

a guest
Feb 14th, 2020
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.69 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. #include <conio.h>
  4. #include <stdio.h>
  5. using namespace std;
  6.  
  7. /* run this program using the console pauser or add your own getch, system("pause") or input loop */
  8.  
  9. int main(int argc, char** argv) {
  10.     system("chcp 1251>0");
  11.     int A=100, B, C, N;
  12.     cout<<"Введите с какой пары и до какой \n";
  13.         cin>>N>>C;
  14.     if ((N<3)&&(C>2)) A+=30;
  15.     N=C-N;
  16.     switch(N)
  17.     {
  18.         case 0: A+=90; break;
  19.         case 1: A+=190; break;
  20.         case 2: A+=290; break;
  21.         case 3: A+=390; break;
  22.         case 4: A+=490; break;
  23.         case 5: A+=590; break;
  24.         case 6: A+=690; break;
  25.     }
  26.     N=A/60;
  27.     C=A%60;
  28.     printf("Потраченное время - %d:%.2d",N,C);
  29.  
  30.    
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement