January 2019 1 11 Report
Potrzebuję zrobić opis tego programu np cout << "Wprowadz dwie liczby: " << endl; ---- wyswietla tekst "Wprowadz dwie liczby: " i przechodzi do następnej lini PILNE NA DZIŚ !
c++

#include

using namespace std;

int main()
{
int a, a2, b2, b, nwd, nww;
cout << "Wprowadz dwie liczby: " << endl;
cin >> a;
cin >> b;

a2 = a;
b2 = b;

while (a != b)
{
if (a > b) {a = a - b;}
else {b = b - a ;}

}
nwd = a2;

nww = (a2 * b2)/nwd;

cout << "NWD wynosi : " << a<< endl;
cout << "NWW wynosi : " << nww<< endl;
return 0;
}


More Questions From This User See All

Recommend Questions



Life Enjoy

" Life is not a problem to be solved but a reality to be experienced! "

Get in touch

Social

© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.