手记

C Plus Plus作业一题8

include "stdafx.h"
include<iostream>

using namespace std;

int main()
{
int a, b, sum, product, difference, quotient;
cout << "Please enter two numbers:\n";
cin >> a >> b;
sum = a + b;
product = a*b;
difference = a - b;
quotient = a / b;
cout << "sum=" << sum << endl;
cout << "product=" << product << endl;
cout << "difference=" << difference << endl;
cout << "quotient=" << quotient<<endl;
}

3人推荐
随时随地看视频
慕课网APP