Dyskusje Q&A
WY I get a rundum number from memory when I run this code
#include <iostream>
using namespace std;
int main ()
{
int array [5];
for (int x = 0; x < 5; x++) {
array [x] = 42;
cout << x << ': ' << array [x] << endl;
}
return 0;
}
if I replace ': ' with ": " every thing works well.
0 głosów
2 odpowiedziwhat 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!?
1 Głos
7 odpowiedziWhat is my mistake?
0 głosów
1 OdpowiedźMethod in python
0 głosów
2 odpowiedziPendulum broken
2 głosów
3 odpowiedziPopularne dzisiaj
OOP python questions
1 Votes
What's wrong with my code?
1 Votes
Python loops
1 Votes
Web page
1 Votes
What is a web browser intension?
1 Votes
Percobaan
0 Votes
Mentors
0 Votes