👤

potrzebuje na dziś, proszeeeeee, daje 20 p.​

Potrzebuje Na Dziś Proszeeeeee Daje 20 P class=

Odpowiedź :

Odpowiedź w c++:

#include <iostream>

using namespace std;

int liczba;

int main()

{

   int suma = 0;

   for(int i = 1; i <= 5; i++){

       cout<<"Wpisz "<<i<<" liczbe: ";

       cin>>liczba;

       suma = suma + liczba;

   }

   cout<<"Suma = "<<suma;

   return 0;

}

Odpowiedź w Python:

suma = 0

for x in range(1, 6):

   liczba = int(input("Podaj " + str(x) + " liczbe: "))

   suma = suma + liczba

print("Suma:", suma)