CS201-Intro to Programming Assignment no. 1 Solution SPRING 2019 Due date: 13 May, 2019 | SUPERSTARWEBTECH

Subject: CS201-Intro to Programming
Semester: FALL 2019
Assignment No. 1
Due date: 13 May 2019

CS201 ASSIGNMENT 1 SOLUTION SPRING 2019

CS201-Intro to Programming Assignment 1 #Question
XYZ University wants to track students’ admissions. They need a program in C++ which will automate the process.

·         The program will display the following menu options to user:-

======================================================

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 the BBA program.

Please enter option 4 for BA program.

===============================================

·         First the user will select the program option, for any invalid option the program should not perform any calculation and display an error message like:-

           THE PROGRAM NAME IS INVALID, PLEASE TRY AGAIN.

Press any key to continue…

·         On pressing any key from the keyboard, the program should start again from the beginning.

·         Upon entering the valid program option, the program will ask the user to enter students’ enrollment for four years as:-

o   Please enter number of students in Year 1.

o   Please enter number of students in Year 2.

o   Please enter number of students in Year 3.

o   Please enter number of students in Year 4.

·         After entering the valid program option and students’ enrollment data for four years, the department name of the program needs to be displayed. (e.g. for BCS & BIT, the department name needs to be DEPARTMENT OF COMPUTER SCIENCE, for BBA, the department name should be DEPRTAMENT OF BUSINESS ADMINISTRATION while for BA, the department name should be DEPARTMENT OF FINE ARTS.)

·         Finally, the program will perform some calculations and will display the following information:-

o   The number of students in each year.

o   The percentage of student’s enrollment in each year against particular program.

o   The total number of students in the program.

o   Also if the number of students enrolled in a year is greater than 100, then display a message that THE NUMBER OF STUDENTS ENROLLED IN THAT YEAR IS OVER THE LIMIT.

CS201-Intro to Programming Assignment 1 Solution! Watch Video

CS201-Intro to Programming Assignment 1 Solution! Download!

CS201 Assignment_1 Solution SPRING_2019 ———————- Download

Leave a Comment

Your email address will not be published. Required fields are marked *

CS201-Intro to Programming Assignment no. 1 Solution FALL 2018 Due date: 05 December, 2018 | SUPERSTARWEBTECH

Subject: CS201-Intro to Programming
Semester: FALL 2018
Assignment No. 1
Due date: 05 December, 2018

CS201 ASSIGNMENT 1 SOLUTION FALL 2018

CS201-Intro to Programming Assignment 1 #Instructions

DON’T miss these important instructions:

Please read the following instructions carefully before submitting assignment:

It should be clear that your assignment will not get any credit if:
§ The assignment is submitted after due date.
§ The assignment is submitted via email.
§ The assignment is copied from Internet or from any other student.
§ The submitted assignment does not open or file is corrupt.
§ It is in some format other than .cpp.

1) Note: You are supposed to submit your assignment in .cpp format. Any other formats like scan images, PDF, zip, doc, rar and bmp etc will not be accepted. All types of plagiarism are strictly prohibited.
For any query about the assignment, contact at CS201@vu.edu.pk

CS201-Intro to Programming Assignment 1 #Objective
To enable students to write, compile and execute a program in Dev C++. Moreover to familiarize students with the concepts of:

Loops
Switch, break, continue
Functions
Arrays
Pointers

CS201-Intro to Programming Assignment 1 #Questions

Write a program which defines three functions:
genRandNum()
findMinNum()
swapValue()

genRandNum(): This function will generate 5 random numbers in range 1-100 and store these numbers in array and print array on console.
Now start sorting these numbers in ascending order (lower to higher) by following the given steps:

1. findMinNum(): This function will search smallest number in unsorted part of array.
2. If leftmost number is the smallest number in unsorted array then no need to swap it otherwise swap the smallest number with left most unsorted number using swapValue() function. Now this number is fully sorted.
3. Repeat the above 2 steps until the whole array get sorted.

CS201-Intro to Programming Assignment 1 #Output Sample

Sample Output:

CS201-Intro to Programming Assignment 1 #Video with output

CS201-Intro to Programming Assignment 1 Solution !Download!

  CS201 Assignment_1 Solution FALL_2018 ———————- Download

Leave a Comment

Your email address will not be published. Required fields are marked *