It looks like you're new here. If you want to get involved, click one of these buttons!
ansarali
Posts: 25,240
CS201 Introduction to Programming Assignment No 01 Solution & Discussion Due Date: 13-05-2019
XYZ University wants to track students’ admissions. They need a program in C++ which will automate the process.
======================================================
Please select the program option, in which you want to enter enrollments.
Please enter option 1 for BCS program.
Please enter option 2 for BIT program.
Please enter option 3 for BBA program.
Please enter option 4 for BA program.
===============================================
THE PROGRAM NAME IS INVALID, PLEASE TRY AGAIN.
Press any key to continue…
Comments
CS201 Final Term Solved MCQs and Subjective by Moaaz
And The remaining mcqs from 41 to 45 lecs
Subjective main aik question Coutab; isko explain karna tha k compiler isay kaisy interprete kary ga.
Contructor destructor k about question thay 2.
Baki sab program thay érror finding error correction k related aur 2 programs ki output btana thi just.
#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; }CS201 Introduction to Programming
Program for class
Write program to copy one array into another array and array of 5 elements
Aur baki questions find errors in the given code
Calloc and malloc function
Write program for constructor
Define Visual Aids 2 marks
What do you understand about claim in business English 2 marks
Rules for writing Bad-news message 3 marks
Briefly explain the content of slides in oral presentation 3 marks
True False(handouts) 3 marks
True False(handouts) 3 marks
How can you make your presentation more interesting and effective? 5 marks
Empirical research report 5 fill in the blanks 5 marks
Turn sentences from active into passive 10 marks
5 same sentences (different punctuation) ???True False 10 MARKS!(lol pata nehi kis nay likha question)
92 323 4134266: Today my cs201 paper
Program for class
Write program to copy one array into another array and array of 5 elements
Aur baki questions find errors in the given code
Calloc and malloc function
Write program for constructor
To day paper is.
2.30 pm
Mcq from moaz and waqar file. Almost 30+.
2.long question about matrix .
And print
Virtual ***university.
Short question based on definition and coding.
1)convert if statement S Code into switch statement form.
2) define Compress of file.
3)new operator and it function.
4)write a program by using macro .
5) define default function argument?
6) classes m sy tha aik question.