• Cursos
  • Compilador de Código
  • Debatir
  • Precios
  • Teams
Menu

Sesiones de PyR

int arr[] = {11, 35, 62, 555, 989}; int sum = 0; for (int x = 0; x < 5; x++) { sum += arr[x]; } cout << sum << endl
arrays
5 Votos
8 Respuestas
27th Nov 2016, 4:31 PM
Bhairesh M
Bhairesh M - avatar
int main() { int b = 5; int arr[b] = {11, 35, 62, 555, 989}; int sum = 0; for (int x = 0; x < 5; x++) { sum+=arr[x]
arraysc++
0 Votos
4 Respuestas
13th Nov 2016, 4:54 PM
prashanth jerry
prashanth jerry - avatar
what is tjis code problem! #include <iostream> using namespace std; int main() { int b = 5; int arr[b] = {11, 35, 62, 555, 989}; int sum = 0; for (int x = 0; x < 5; x++) { sum += arr[x]; } cout << sum << endl; return 0; } I cannot make an array using int variable in order to define array's element number!?
arraysc++
1 Voto
7 Respuestas
30th Jul 2016, 9:14 PM
Hesam Alinejad
Hesam Alinejad - avatar
Given a list of numbers, output their sum using for loop.
[42,0,1,124,3,555,67,7,8,8897,99]sum=0foriinsx:x=
0 Votos
6 Respuestas
18th Jul 2022, 9:40 AM
Syed Anas
Syed Anas - avatar
En tendencia hoy
Ai generated practices
2 Votes
I have finished first in Saturn League 3 times in a row, why have I not been given the badge for “Intergalactic Champion”
0 Votes
Solving coding challenges
1 Votes
Feedback on my portfolio
0 Votes
Yo this is madness
0 Votes
Changing String Variables into int in C++
0 Votes
I am new
1 Votes
Advertising in Sololearn
0 Votes
How can i insert files?
1 Votes
Fill in the blank to declare a static variable.
0 Votes