返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     re:
  7.         system("cls");
  8.         int a;
  9.         cout<<"輸入想換算的分鐘數"<<endl;
  10.         cin>>a;
  11.         if(a>1440){
  12.             cout<<a/1440<<"天"<<endl;
  13.             a%=1440;
  14.         }
  15.         if(a>60){
  16.             cout<<a/60<<"小時"<<endl;
  17.             a%=60;
  18.         }
  19.         if(a>0){
  20.             cout<<a<<"分鐘"<<endl;
  21.         }
  22.         cout<<endl;
  23.         system("pause");
  24.         goto re;
  25.         return 0;
  26. }
複製代碼

TOP

返回列表