#include <iostream>
using namespace std;
int nUzdevums()
{
cout << "Ieraksti cenu " << endl;
float cena;
cin >> cena;
cout << "Ieraksti preces daudzumu " << endl;
int daudzums;
cin >> daudzums;
cout << "Kopaa tu samaksasi " << cena*daudzums << " latus";
cout << endl;
cout << "..........................................";
cout << endl;
cout << endl;
cout << "Vai velies atkartot operaciju? Y = Jaa , N = Nee";
return 0;
}
int main()
{
nUzdevums();
cin.clear();
cin.ignore(255, '\n');
cin.get();
}
What i am trying to do here is when user press Y , it does the nUzdevums(); again , but on N press , it exits the console

New Topic/Question
Reply



MultiQuote









|