CS201 Assignment 1 Solution 2021 | Spring 2021 | Virtual Study Solutions

Adsetra Ads

 

CS201 Assignment 1 Spring 2021

Dear Students, Here you can read or download CS201 - Introduction to Programming Assignment 1 Solution of Spring 2021. CS201 Assignment 1 Solution 2021 | Spring 2021 Solution File and Sample Preview have also been added below. Assignment Due Date is 20-5-21 Previously we shared CS201 Assignment No 1 Solution Spring 2020.

CS201 Assignment 1 Solution 2021 | Spring 2021
CS201 Assignment 1 Solution 2021 | Spring 2021

CS201 Assignment Question:

An expression is given here. You are required to write a C++ program that solves the given mathematical expression.

Z = x2 + 2xy – x/y

set the values of x = 2 and y = 1

Three main tasks are to be done by each student:-
  • Expression solving
  • Decisions making (if-else structure)
  • Repetition structure (while loop).
After evaluation of the above expression, you should add the value of z to the last digit of your VU id. As a result.

If you get an odd number, then you should print your VU id using a while loop. This while loop should run as many times as the odd number you got from (z+ last digit of your VU id).

For example, suppose the value of z is 2 and the student’s id is BC123456781. Then by adding the last digit of VU id 1 to the value of z, the result will be 3 which is an odd number. In this case, the program should print your VU ID 3 times using a while loop.

cs201 assignment question output 1

If you get an even number, then you should print your Name using a while loop. This while loop should run as many times as even the number you got from (z+ last digit of your VU id).

For example, suppose the value of z is 2 and the student’s id is BC123456782. Then by adding the last digit of VU id 2 to the value of z, the result will be 4 which is an even number. In this case, the program should print your Name four 4 times using a while loop.

cs201 assignment question output 2

CS201 Assignment 1 Solution 2021 | Spring 2021

You can see the Sample Preview of CS201 Assignment 1 Solution 2021 provided by (Virtual Study Solutions) below. Click on Download Button to Download Solution File on Your PC. Please Share it with your friends. You can also like our Facebook Page or Subscribe to Us on YouTube for Latest Updates related to Assignment Solutions and Past Papers.

Solution Output Preview


CS201 Assignment 1 Solution output Spring 2021
CS201 Assignment 1 Solution output Spring 2021

We also recommend you to read:

STA100 Assignment 1 Solution 2021 | Spring 2021

ECO401 Assignment No 1 2021 | Spring 2021

Please Note:
We are here to facilitate your learning and we do not appreciate the idea of copying or replicating solutions. 

Download CS201 Assignment 1 Solution Spring 2021

File Name
Download Link
 CS201 Assignment 1 Solution Spring 2021.docx 

Share your valuable feedback in the comments section. Thank You.

Post a Comment

 

Top