B2010 带余除法(题解)

· · 题解

这道题让输入被除数和除数,输出(整数)商和余数,除号是“/”取余数是“%” 注意:商和余数之间用“ ”隔开

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a,b;
    cin>>a>>b;
    cout<<a/b<<" "<<a%b;//输出
    return 0; 
    }