F&A Diskussionen
Output of C++ code
0 Stimmen
2 AntwortenCan anyone explain this code.
2 Stimmen
1 Antworthelp
-2 Stimmen
5 AntwortenIn the code below the output is 2. This code is used in a challenge and I get an error when I select the answer 2. It accepts as correct the answer 1 which I believe is wrong. If you agree please thumbs up.
If you find any other errors please post them here!
#include <iostream>
using namespace std;
int main()
{
for(int i=1; i>=1; i++) {
if(i<1 || i>1){
cout << i;
break;
}
}
return 0;
}
8 Stimmen
8 AntwortenLoop
1 Stimme
5 AntwortenWY 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 Stimmen
2 AntwortenWhy value of "x" will be 70 ?
1 Stimme
2 AntwortenWhat's Wrong With My Code??
0 Stimmen
2 Antwortenما هو الخطأ فى هذا الكود
0 Stimmen
2 AntwortenWhy this code doesn't go?
1 Stimme
1 AntwortWhy is not working
0 Stimmen
3 Antwortenusing System;
namespace GoodProgrammerTest
{
class Program
{
static void Main(string[] args)
{
Console.Write("Enter Yes or No");
Console.Write(
"Do you programme every day? : ") ;
int answer = Console.ReadLine();
if (answer =="Yes")
{
Console.WriteLine(
"You will be a good programmer");
}
else
{
Console.WriteLine(
"You will not be a good programmer");
}
}
}
}
2 Stimmen
3 AntwortenWhy we use c++ for programming??
2 Stimmen
2 AntwortenHeute heiß
Hi help me I am new
2 Votes
How do I solve all test cases for popsicles problem?https://www.sololearn.com/coach/3?ref=app
0 Votes
Where can I learn c#
0 Votes
Where did mess up....
1 Votes
Question
0 Votes