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 my mistake?
0 głosów
1 OdpowiedźMethod in python
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 odpowiedziPendulum broken
2 głosów
3 odpowiedziPopularne dzisiaj
Hello World!
0 Votes
Why's there an error
1 Votes
Hello people
1 Votes
What to learn🤔
0 Votes
Linked list
1 Votes
Html
0 Votes
String functions
1 Votes