2016/11/30

M90H011:整數商餘

#include <iostream>
using namespace std;
int main(){
     int a=0,b=0,c=0,t=0;
	 cin>>a;
	 cin>>b;
	 c=a/b;
	 t=a%b;
	 cout << endl;
	 cout <<a<<" / "<<b<<"="<<c<<"\n";
	 cout <<a<<" mod "<<b<<"="<<t;
}

沒有留言:

張貼留言