Thứ Tư, 27 tháng 4, 2022

DIVMOD10 C++

#include <bits/stdc++.h>
using namespace std;

int a,d,m;
int main()
{
    freopen("divmod10.inp","r",stdin);
    freopen("divmod10.out","w",stdout);
    cin>>a;
    m = a%10;
    d = a/10;
    cout<<a<<" mod 10 = "<<m<<endl;
    cout<<a<<" div 10 = "<<d;
}

Không có nhận xét nào:

Đăng nhận xét

Lưu ý: Chỉ thành viên của blog này mới được đăng nhận xét.