👤

scrieti altgoritmul care calculeaza suma a 5 numere a,b,c,d,e

ajutati.ma dau coroana​


Răspuns :

Răspuns:

#include<iostream>

using namespace std;

int main()

{unsigned a,b,c,d,e,s=0;

cin>>a>>b>>c>>d>>e;

s=a+b+c+d+e;

cout<<s;

return 0;}

#include <iostream>

using namespace std;

int main ()

{

int a, b, c, d, e, suma;

suma = 0;

cout << "a =" << endl;

cin >> a ;

cout << "b =" << endl;

cin >> b;

cout << "c =" << endl;

cin >> c;

cout << "d =" << endl;

cin >> d;

cout << "e =" << endl;

cin >> e;

suma = a + b + c + d + e;

cout << "Suma numerelor introduse este " << suma << endl;

return 0;

}

- Lumberjack25