Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.


CS201 Assignment 01 Spring 2021 Solution / Discussion Due Date: 20-05-2021

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:- 1. Expression solving 2. Decisions making (if-else structure) 3. Repetition structure (while loop). After evaluation of above expression, you should add the value of z to last digit of your vu id. As a result, 1. If you get an odd number, then you should print your VU id using while loop. This while loop should run as many times as 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 last digit of vu id 1 to value of z, result will be 3 which is an odd number. In this case, program should print your VU ID for 3 times using while loop. 1. If you get an even number, then you should print your Name using while loop. This while loop should run as many times as even 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 last digit of vu id 2 to the value of z, result will be 4 which is an even number. In this case, program should print your Name for 4 times using while loop.

Views: 1429

Replies to This Discussion

Assignment # 1 [Due Date Extended]
Dated:May 18, 21

Dear Student,

Firstly: The due date of Assignment # 1 has been extended to 21st May 2021.
Secondly:
In assignment the value of z, student id and name are supposed. The screen shots are also given as example having supposed values.
You have to calculate the real value of z by solving expression in code by keeping x and y variable values fixed as given in assignment.
Then use your own real VU id to calculate (z + lastdigit of VU Id) value. 
If its result is even value then print your name for even times only, otherwise if you get odd result then print your VU Id for odd times only.

RSS

Looking For Something? Search Below

VIP Member Badge & Others

How to Get This Badge at Your Profile DP

------------------------------------

Management: Admins ::: Moderators

Other Awards Badges List Moderators Group

© 2021   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service