i need error message on loop + array | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

i need error message on loop + array

need error on array loop when you try to put 36 onward in your reservation. i try putting this in my code but it didn't work if (seat <= 36; seat++) { cout << "Invalid Seat Number!"; } https://code.sololearn.com/cWq3ngWEGaNr/#cpp

25th Jan 2019, 5:06 AM
Jefferson Villanueva
Jefferson Villanueva - avatar
3 Answers
0
I put this code above the if statement if(arr[grows][gcolumns]>=36) { cout ”invalid seat number”; } my problem now is when I input 37 onwards the invalid seat number is not showing when I run my code
25th Jan 2019, 7:03 AM
Jefferson Villanueva
Jefferson Villanueva - avatar
0
thanks
25th Jan 2019, 7:17 AM
Jefferson Villanueva
Jefferson Villanueva - avatar
0
I'm focusing too much to my array haha thanks Julien Quentin
25th Jan 2019, 7:17 AM
Jefferson Villanueva
Jefferson Villanueva - avatar