Dear Students! Today i am going to share with you Solution of CS-201 Assignment No 1 Fall 2019 Due Date 13-May-2019,.
Solution of CS201 Assignment No1 2019
Here i have created a guided video to solve this assignment kindly watch the video below to see how to solve this assignment and also i have given solution file below the video
Here is the the given solution code which is mentioned in video above.
Steps invloved to solve this assignments
First of all you need DevC++ to solve this assignment, if you don't have this software then Click Here to Download.
Now Open DevC++ and Create New Project and give name it as you VU ID.
Now Copy all the code which is given in video above also given below and Paste it in your project File. Click this button to show code
//CS201 Assignment No 1 Solution 2019 Due Date May 13- 2019
//SOlution Provided by www.infopalacess.com
//Must Replace Second Line with you VU Id
#include <iostream>
#include <stdlib.h>
#include <conio.h>
using namespace std;
int main()
{
int total = 0, ch, nOfstudents1, nOfstudents2, nOfstudents3, nOfstudents4;//store the use choice
int percent;
while (true) {
cout << "=================================================\n";
cout << "Please select the program option, in which you want to enter enrollemnts\n\n";
cout << "Please enter option 1 for BCS\n";
cout << "Please enter option 2 for BIT\n";
cout << "Please enter option 3 for BBA\n";
cout << "Please enter option 4 for BA\n";
cout << "Please Enter program option:\t";
cin >> ch;
cout << "\n=======================================================================\n";
if (ch >= 1 && ch <= 4) {
break;
}
else {
cout << "THE PROGRAM OPTION IS INVALID PLEASE TRY AGAIN.";
cout << "Press any key to continue...";
_getch();
system("cls");
}
}//while loops ends
switch (ch) {
case 1:
cout << "\nPlease Enter number of students in Year 1 :\t";
cin >> nOfstudents1;
cout << "\nPlease Enter number of students in Year 2 :\t";
cin >> nOfstudents2;
cout << "\nPlease Enter number of students in Year 3 :\t";
cin >> nOfstudents3;
cout << "\nPlease Enter number of students in Year 4 :\t";
cin >> nOfstudents4;
cout << "======================DEPARTMENT OF COMPUTER SCIENCE ================================\n";
cout << "The number of Students in Year 1 is :\t" << nOfstudents1;
cout << "\nThe number of Students in Year 2 is :\t" << nOfstudents2;
cout << "\nThe number of Students in Year 3 is :\t" << nOfstudents3;
cout << "\nThe number of Students in Year 4 is :\t" << nOfstudents4;
percent = (nOfstudents1 * 100.0) / 371;
cout << "\n\nThe percentage of Students in Year 1 is :\t" << percent << "%";
percent = (nOfstudents2 * 100.0) / 371;
cout << "\nThe percentage of Students in Year 2 is :\t" << percent<< "%";
percent = (nOfstudents3 * 100.0) / 371;
cout << "\nThe percentage of Students in Year 3 is :\t" << percent << "%";
percent = (nOfstudents4 * 100.0) / 371;
cout << "\nThe percentage of Students in Year 4 is :\t" << percent<< "%";
total = nOfstudents1 + nOfstudents2 + nOfstudents3 + nOfstudents4;
cout << "\n\nThe total number of students in program is :\t" << total;
//check the enrollment is over the limit
if (nOfstudents1 > 100) {
cout << "\n\nThe number of students enrolled in year 1 is over the limit.";
}
if (nOfstudents2 > 100) {
cout << "\nThe number of students enrolled in year 2 is over the limit.";
}
if (nOfstudents3 > 100) {
cout << "\nThe number of students enrolled in year 3 is over the limit.";
}
if (nOfstudents4 > 100) {
cout << "\nThe number of students enrolled in year 3 is over the limit.";
}
break;
case 2:
cout << "\nPlease Enter number of students in Year 1 :\t";
cin >> nOfstudents1;
cout << "\nPlease Enter number of students in Year 2 :\t";
cin >> nOfstudents2;
cout << "\nPlease Enter number of students in Year 3 :\t";
cin >> nOfstudents3;
cout << "\nPlease Enter number of students in Year 4 :\t";
cin >> nOfstudents4;
cout << "======================DEPARTMENT OF COMPUTER SCIENCE ================================\n";
cout << "The number of Students in Year 1 is :\t" << nOfstudents1;
cout << "\nThe number of Students in Year 2 is :\t" << nOfstudents2;
cout << "\nThe number of Students in Year 3 is :\t" << nOfstudents3;
cout << "\nThe number of Students in Year 4 is :\t" << nOfstudents4;
percent = (nOfstudents1 * 100.0) / 371;
cout << "\n\nThe percentage of Students in Year 1 is :\t" << percent << "%";
percent = (nOfstudents2 * 100.0) / 371;
cout << "\nThe percentage of Students in Year 2 is :\t" << percent << "%";
percent = (nOfstudents3 * 100.0) / 371;
cout << "\nThe percentage of Students in Year 3 is :\t" << percent << "%";
percent = (nOfstudents4 * 100.0) / 371;
cout << "\nThe percentage of Students in Year 4 is :\t" << percent << "%";
total = nOfstudents1 + nOfstudents2 + nOfstudents3 + nOfstudents4;
cout << "\n\nThe total number of students in program is :\t" << total;
//check the enrollment is over the limit
if (nOfstudents1 > 100) {
cout << "\n\nThe number of students enrolled in year 1 is over the limit.";
}
if (nOfstudents2 > 100) {
cout << "\nThe number of students enrolled in year 2 is over the limit.";
}
if (nOfstudents3 > 100) {
cout << "\nThe number of students enrolled in year 3 is over the limit.";
}
if (nOfstudents4 > 100) {
cout << "\nThe number of students enrolled in year 3 is over the limit.";
}
break;
case 3:
cout << "\nPlease Enter number of students in Year 1 :\t";
cin >> nOfstudents1;
cout << "\nPlease Enter number of students in Year 2 :\t";
cin >> nOfstudents2;
cout << "\nPlease Enter number of students in Year 3 :\t";
cin >> nOfstudents3;
cout << "\nPlease Enter number of students in Year 4 :\t";
cin >> nOfstudents4;
cout << "======================DEPARTMENT OF BUSINESS ADMINISTRATION
================================\n";
cout << "The number of Students in Year 1 is :\t" << nOfstudents1;
cout << "\nThe number of Students in Year 2 is :\t" << nOfstudents2;
cout << "\nThe number of Students in Year 3 is :\t" << nOfstudents3;
cout << "\nThe number of Students in Year 4 is :\t" << nOfstudents4;
percent = (nOfstudents1 * 100.0) / 371;
cout << "\n\nThe percentage of Students in Year 1 is :\t" << percent << "%";
percent = (nOfstudents2 * 100.0) / 371;
cout << "\nThe percentage of Students in Year 2 is :\t" << percent << "%";
percent = (nOfstudents3 * 100.0) / 371;
cout << "\nThe percentage of Students in Year 3 is :\t" << percent << "%";
percent = (nOfstudents4 * 100.0) / 371;
cout << "\nThe percentage of Students in Year 4 is :\t" << percent << "%";
total = nOfstudents1 + nOfstudents2 + nOfstudents3 + nOfstudents4;
cout << "\n\nThe total number of students in program is :\t" << total;
//check the enrollment is over the limit
if (nOfstudents1 > 100) {
cout << "\n\nThe number of students enrolled in year 1 is over the limit.";
}
if (nOfstudents2 > 100) {
cout << "\nThe number of students enrolled in year 2 is over the limit.";
}
if (nOfstudents3 > 100) {
cout << "\nThe number of students enrolled in year 3 is over the limit.";
}
if (nOfstudents4 > 100) {
cout << "\nThe number of students enrolled in year 3 is over the limit.";
}
break;
case 4:
cout << "\nPlease Enter number of students in Year 1 :\t";
cin >> nOfstudents1;
cout << "\nPlease Enter number of students in Year 2 :\t";
cin >> nOfstudents2;
cout << "\nPlease Enter number of students in Year 3 :\t";
cin >> nOfstudents3;
cout << "\nPlease Enter number of students in Year 4 :\t";
cin >> nOfstudents4;
cout << "======================DEPARTMENT OF FINE ARTS ================================\n";
cout << "The number of Students in Year 1 is :\t" << nOfstudents1;
cout << "\nThe number of Students in Year 2 is :\t" << nOfstudents2;
cout << "\nThe number of Students in Year 3 is :\t" << nOfstudents3;
cout << "\nThe number of Students in Year 4 is :\t" << nOfstudents4;
percent = (nOfstudents1 * 100.0) / 371;
cout << "\n\nThe percentage of Students in Year 1 is :\t" << percent << "%";
percent = (nOfstudents2 * 100.0) / 371;
cout << "\nThe percentage of Students in Year 2 is :\t" << percent << "%";
percent = (nOfstudents3 * 100.0) / 371;
cout << "\nThe percentage of Students in Year 3 is :\t" << percent << "%";
percent = (nOfstudents4 * 100.0) / 371;
cout << "\nThe percentage of Students in Year 4 is :\t" << percent << "%";
total = nOfstudents1 + nOfstudents2 + nOfstudents3 + nOfstudents4;
cout << "\n\nThe total number of students in program is :\t" << total;
//check the enrollment is over the limit
if (nOfstudents1 > 100) {
cout << "\n\nThe number of students enrolled in year 1 is over the limit.";
}
if (nOfstudents2 > 100) {
cout << "\nThe number of students enrolled in year 2 is over the limit.";
}
if (nOfstudents3 > 100) {
cout << "\nThe number of students enrolled in year 3 is over the limit.";
}
if (nOfstudents4 > 100) {
cout << "\nThe number of students enrolled in year 3 is over the limit.";
}
break;
}//switch ends
cout << "\n\n Press any key to continue...";
_getch();
return 0; }
If you have any Problem regarding your assignment Solution then you can contact Us or leave a Comment below. You can also subscribe our Official YouTube Channel to get guided videos of all assignments, quizes or GDB. You can also join our Official WhatsApp Groups by Click on the links Below.
Description | Links |
---|---|
YouTube Channel: | Infopalacess Official Tuts |
WhatsApp Group 1: | VU Assignments Portal by Infopalacess 2 |
WhatsApp Group 2 | VU Assignments Portal by Infopalacess 2 |
0 Comments