有关c++代码的编写

img


就是要求写一个代码,关于自己输入两个个位数进行相乘,再输入答案,正确就显示right,错误就显示wrong

#Include <iostream>
using namespace std;
int main()
{
    int a,b,c;
    cout<<"请输入两个整数:";
    cin>>a>>b;
    cout<<"请输入这两个整数的乘积:";
    cin>>c;
    if(c == a*b)
        cout<<"right";
    else
        cout<<"wrong";
    return 0;
}