Discussions Q&R
When 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 Vote
4 RĂ©ponsesHello guys right now I am kinda of new in python
my question is related to the function call len()
len() its print out the character but here it's the confusing part, I am working with a list let me explain an example
players
['lee', 'bob', 'moe', 'joe']
len(players)
4
why it's giving me 4 item in the list I thought len it counts the characters and if I do this it give me the correct somewhat answer what I am seeking,
len(players [-1])
3
0 Vote
8 RĂ©ponseshey I have a doubt in brute force prg by Mr robot .......so it's just checking each character and storing it in a string ....and he is giving it a name..so I have to ask that how I will setup or send a link to someone whom I wanna hack and whatever he types in my prg I will get it...plz plz help me...using Mr robot program
0 Vote
4 RĂ©ponseshow to write a program that reads in a character <char> from the keyboard and then displays one of the following messages
1. if<char> is in lowercase letter the message
"the uppercase letter corresponding to char is..."
2. if<char> is in uppercase letter the message
"the lowercase letter corresponding to char is..."
3. of char is not a letter, the message char is not a letter.
0 Vote
3 RĂ©ponsesWhen I enter two numbers the sum comes.. 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 Vote
2 RĂ©ponsesAujourd'hui en vedette
Pig Latin
0 Votes
Someone can help me
0 Votes
Square Roots
0 Votes
What's wrong with this?
2 Votes
Iâm new someone can help me
0 Votes
What's doctype htMl
2 Votes
HTML community, HELP!!
0 Votes