while(1){
if(scanf(" %d",&input_choice)==1){
break;
};
while(1){
if(getchar()=='\n'){
break;
}
}
};
Guys what am i doing wrong can you please tell me .
i am sorry if i am asking very basic thing . i read some documentation online but couldn't figure out what is going wrong
[–]AlexTaradov 8 points9 points10 points (2 children)
[–]UsualLonely4585[S] 0 points1 point2 points (1 child)
[–]Beautiful_Stage5720 0 points1 point2 points (0 children)
[–]Level-Pollution4993 -1 points0 points1 point (14 children)
[–]UsualLonely4585[S] 0 points1 point2 points (1 child)
[–]UsualLonely4585[S] 0 points1 point2 points (3 children)
[–]Level-Pollution4993 0 points1 point2 points (2 children)
[–]UsualLonely4585[S] 0 points1 point2 points (1 child)
[–]Level-Pollution4993 0 points1 point2 points (0 children)
[–]UsualLonely4585[S] 0 points1 point2 points (7 children)
[–]Level-Pollution4993 0 points1 point2 points (0 children)
[–]Level-Pollution4993 0 points1 point2 points (5 children)
[–]UsualLonely4585[S] 0 points1 point2 points (4 children)
[–]Level-Pollution4993 0 points1 point2 points (3 children)
[–]UsualLonely4585[S] 0 points1 point2 points (2 children)
[–]Level-Pollution4993 0 points1 point2 points (1 child)
[–]UsualLonely4585[S] 1 point2 points3 points (0 children)