Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cstdio>
- #include<conio.h>
- using namespace std;
- int main() {
- int nav_d_hh, nav_d_mm, trival, kilkist;
- printf("Zadayite pochatok navchalnogo dnya(godini): ");
- scanf_s("%d", &nav_d_hh);
- printf("Zadayite pochatok navchalnogo dnya(minuti): ");
- scanf_s("%i", &nav_d_mm);
- printf("Zadayite trivalist odnogo uroka(v minutah): ");
- scanf_s("%i", &trival);
- printf("Zadayte kilkist uriokiv v etot den: ");
- scanf_s("%i", &kilkist);
- printf("%d", nav_d_hh);
- printf(".");
- printf("%d ", nav_d_mm);
- printf("- ");
- printf("eto 1 urok");
- printf("\n");
- int i = 1;
- do
- {
- nav_d_mm += trival;
- if (nav_d_mm>= 60) { nav_d_hh += 1; nav_d_mm -= 60; }
- printf("%d", nav_d_hh);
- printf(".");
- printf("%d ", nav_d_mm);
- printf("- ");
- printf("eto ");
- printf("%d", i+1);
- printf("urok\n");
- ++i;
- }
- while (i < kilkist);
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement