Playground
#include <iostream> using namespace std; int add(int a, int b) { return (a+b); } int main() { int a, b; //deklariraj dve promenlivi cout << "Vnesi dva broja: "; //pobaraj od korisnikot da vnese dva broja cin >> a >> b; //smesti go prviot vo a, a vtoriot vo b int rezultat; //nova promenliva rezultat = add(a, b); //smesti go rezultatot vo 'rezultat' cout << rezultat << endl; //otpechati go rezultatot return 0; }
Input data
Program output
15 7
Execute
Language: ????????? | Memory: ???? KB | Time: ??? ms
Nothing has been executed, yet!