返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     re:
  7.     system("cls");
  8.     int cm, sum=0;
  9.     cout<<"請問有幾位學生: ";
  10.         cin>>cm;
  11.         sum=cm/12*50+cm%12*5;
  12.         cout<<"總共"<<sum<<"元"<<endl;
  13.         cout<<cm/12<<"打,"<<cm%12<<"支"<<endl;
  14.     system("pause");
  15.     goto re;
  16.     return 0;
  17. }
複製代碼
Huang chenhao

TOP

返回列表