• Cursos
  • Compilador de Código
  • Debatir
  • Precios
  • Teams
Menu

Sesiones de PyR

When 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');
c++
0 Votos
2 Respuestas
10th Oct 2016, 1:14 PM
Soutik
Soutik - avatar
< Anterior1...67Siguiente >
En tendencia hoy
overloading operators << >>
1 Votes
how does this code function?
1 Votes
.
1 Votes
Default constructor and default assignment operator
0 Votes
.
0 Votes
Wishkit alternative for android
1 Votes
Hi
0 Votes
My question is about python?
0 Votes
Issue in code
0 Votes
i need to learn Coding
0 Votes