Write a program that input number of students and determine smallest classroom that can accomodate those students.
A sample run :
Enter number of students: 79
Classroom: B
XiaO yuEn
0
Newbie Poster
Recommended Answers
Jump to Posthere you go
#include<iostream.h> #include<conio.h> int main() { int c; cout<<"Enter number of students:"; cin>>c; if(c>100) { cout<<"No class available"; } else if(c>80) { cout<<"Class room A"; } else if(c>75) { cout<<"Class room B"; } else if(c>45) { cout<<"Class room c"; } else if(c>25) { cout<<"Class room …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.