Cov txheej txheem:

YUAV UA LI CAS Ua Plaub FUNCTIONAL CALCULATOR hauv CPP: 6 Kauj Ruam
YUAV UA LI CAS Ua Plaub FUNCTIONAL CALCULATOR hauv CPP: 6 Kauj Ruam

Video: YUAV UA LI CAS Ua Plaub FUNCTIONAL CALCULATOR hauv CPP: 6 Kauj Ruam

Video: YUAV UA LI CAS Ua Plaub FUNCTIONAL CALCULATOR hauv CPP: 6 Kauj Ruam
Video: Finance with Python! Net Present Value (NPV) 2024, Lub Xya hli ntuj
Anonim
YUAV UA LI CAS Ua Plaub FUNCTIONAL CALCULATOR hauv CPP
YUAV UA LI CAS Ua Plaub FUNCTIONAL CALCULATOR hauv CPP

Lub laij lej tau siv rau txhua tus hauv lub neej txhua hnub. Lub tshuab xam zauv yooj yim tuaj yeem ua tau siv C ++ program uas muaj peev xwm ntxiv, rho tawm, sib faib thiab faib, ob txoj haujlwm nkag los ntawm tus neeg siv. Cov lus thiab yog tau txais los siv los tsim lub laij lej.

Kauj ruam 1: Qhib Koj Tus IDE

Qhib Koj Tus IDE
Qhib Koj Tus IDE

koj tuaj yeem siv txhua hom IDE

xws li geny, cfree, pom lub studio thiab lwm yam….

Kauj Ruam 2: Txuag Txoj Haujlwm Nrog Txuas Ntxiv ".cpp"

Txuag Txoj Haujlwm Nrog Txuas Ntxiv
Txuag Txoj Haujlwm Nrog Txuas Ntxiv

Kauj Ruam 3: Luam Cov Cai Hauv qab no thiab muab tshuaj txhuam rau hauv Compiler IDE

#suav nrog

siv namespace std; int lub ntsiab () {char a; ploj z; khob r; r: {system ("cls"); cout << "enter"+"ntxiv" << endl << "enter"-'rau kev rho tawm "<< endl <<" enter'*'rau kev sib npaug "<< endl <<" enter "/" for division " a; yog (a == '+') {ntab x, y; cout << "sau thawj tus lej" x; cout << "nkag tus lej thib ob" y; z = x+y; cout << "sum of" << x << "+" << y << "=" << z << endl; } lwm yog (a == '-') {ntab x, y; cout << "sau thawj tus lej" x; cout << "nkag tus lej thib ob" y; z = x-y; cout << "rho" << x << "-" << y << "=" << z << endl; } lwm yog (a == '*') {ntab x, y; cout << "sau thawj tus lej" x; cout << "nkag tus lej thib ob" y; z = x*y; cout << "multiplicative product of" << x << "*" << y << "=" << z << endl; } lwm yog (a == '/') {ntab x, y; ploj z; cout << "sau thawj tus lej" x; cout << "nkag tus lej thib ob" y; z = x/y; cout << "faib ntawm" << x << "/" << y << "=" << z << endl; } else {cout << "tsis paub ua haujlwm / n"; } mus p; } p: cout << "mus txuas ntxiv r '" << endla; yog (a == 'r') {goto r; } lwm yog (a == 'c') {goto e; } lwm {goto p; } e: {}

Pom zoo: