Advertisement
andruhovski

prog-p-0102

Sep 22nd, 2014
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.50 KB | None | 0 0
  1. // ConsoleApplication19.cpp : Defines the entry point for the console application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include <locale.h>
  6.  
  7. int _tmain(int argc, _TCHAR* argv[])
  8. {
  9.     setlocale(LC_ALL,"Ukrainian");
  10.     int minutes=1; //вхідні дані
  11.     int hh,mm;     //результат
  12.  
  13.     while(true) {
  14.         puts("Задайте час в хв.");
  15.         scanf_s("%d",&minutes);
  16.         if (minutes>0)
  17.         {
  18.             hh=minutes/60;
  19.             mm=minutes%60;
  20.             printf("hh=%d mm=%d\n",hh,mm);
  21.         }
  22.         else
  23.             break;
  24.     };
  25.     return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement