c++乘法竖式
程序代码:
#include<iostream> #include<iomanip> using namespace std; int main() { short chengshu, beichengshu; cout << "两位乘法"<<endl; cin >> chengshu >> beichengshu; system("cls"); cout << setw(7) << chengshu << endl; cout << setw(1) << "×" << setw(5) << beichengshu<<endl; cout << setw(7)<<"-------"; cout << endl; cout << setw(7) << chengshu * (beichengshu % 10)<<endl; cout << setw(6) << chengshu * (beichengshu / 10)<<endl; cout << setw(7) << "-------"<<endl; cout << setw(7) << beichengshu * chengshu; while (true) { } }