New course! Every coder should learn Generative AI!
Try a free lessonQ&A Discussions
What'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 AnswersWhen I enter two numbers the sum is displayed.. but when I input character as yes not y... Then it goes into an infinite loop... can anyone explain why?
int a,b;
char ch;
do
{
cout<<"Enter two numbers: ";
cin>>a>>b;
cout<<"The sum is "<<a+b
<<"\nDo you want to try again (y/n): ";
cin>>ch;
}while(ch=='Y'||ch=='y');
0 Votes
4 AnswersHot today
Comparing code coach solutions
3 Votes
Automatation python
1 Votes
General python
1 Votes
Coding
1 Votes
view challenge analytics
2 Votes
Problem with application
0 Votes
HTML
0 Votes
how to create a website
0 Votes
How to make a game with Phyton
1 Votes
How to change the font
0 Votes