Q&A Discussions
In 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 Votes
8 AnswersWhat's Wrong With My Code??
0 Votes
2 Answersما هو الخطأ فى هذا الكود
0 Votes
2 AnswersWhy is not working
0 Votes
3 Answersusing 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 Votes
3 AnswersHot today
Pig Latin
0 Votes
Ejercicio Pytho
0 Votes
Please rate my code from 1 to 10
2 Votes
Square Roots
0 Votes
What's wrong with this?
1 Votes
Uuu
2 Votes
How to start
0 Votes