CS201 Assignment 2 Solution 2020

0
263
CS201 Assignment 2 Solution 2020

CS201 Assignment 2 Solution 2020

Assignment No. 2
Semester: Spring 2020

CS201 – Introduction to Programming

Instructions

CS201 Assignment 2 Solution :

Click Here: Download  

Please read the following instructions carefully before submitting the assignment:

It should be clear that your assignment will not get any credit if:

  1.  The assignment is submitted after the due date.
  2. The submitted assignment does not open or file is corrupt.
  3. The assignment is copied (From the internet/students).

The software allowed to develop Assignment

–          Dev C++

Objectives:

In this assignment, the students will learn:

So How to fill/populate a two-dimensional array using given source data.

How to write user-defined functions and pass an array to them as parameters.

So How to use if statement and do-while loop.

How to calculate the percentage in elements of the array.

How to display array elements.

Assignment Submission Instructions

You are required to submit only.cppfile on the assignments interface of CS201 at VU-LMS. Assignment submitted in any other format will not be accepted and will be graded zero marks.

CS201 Assignment 2 Solution :

Click Here: Download  

Problem Statement

Write a menu in C++ which should show the country code and name at the start of the application:

0 for Pakistan.

1 for China.

2 for Italy.

3 for the UK.

4 for Iran.

5 for France.

6 for Turkey.

7 to exit.

Instructions to write C++ program:

Ø  Write functions to calculate % of recovered patients,  % of deaths in a specific country. The following function names should be used for consistency.

To display all elements in matrix form showElements( );
Percentage of death PercentageDeath ( ):
Percentage of recovered PercentageRecovered();

Source data:

Country Code Total

Cases

Total

Deaths

Total

Recovered

0 560,433 22,115 32,634
1 156,363 19,899 34,211
2 84,279 10,612 0
3 82,160 3,341 77,663
4 71,686 4,474 43,894
5 56,956 1,198 3,446
6 5,374 93 1095

CS201 Assignment 2 Solution :

Click Here: Download  

Sample Output Available on Assignment File :