得先读入```a```和```b```,再计算```c```和```d```
AC代码:
```cpp
#include <stdio.h>
int main()
{ int a,b;
scanf("%d %d", &a, &b);
int c = a/b;
int d = a%b;
printf("%d %d", c, d);
return 0;
}
```
by wanglexi @ 2023-10-21 21:53:59
@[great_mad](/user/1160345)
```cpp
#include<bits/stdc++.h>
using namespace std;int main() {
int a,b;cin >> a >> b ; cout << a / b << " " << a % b;}
```
by ljk654321 @ 2023-12-06 16:22:44
###### 正解:
```cpp
#include <stdio.h>
int main()
{ int a,b;
scanf("%d %d", &a, &b);
int c = a/b;
int d = a%b;
printf("%d %d", c, d);
return 0;
}
by aochiao @ 2024-05-01 16:04:10
AC代码:
```cpp
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;//输入
cout<<a/b<<" "<<a%b<<endl;//空格隔开
return 0;
}
```
by lihanning @ 2024-09-10 21:58:05