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: 1478

Replies to This Discussion

CS201 Assignment 01 Spring 2021 Solution in PDF format

Click on the below link to download the file

CS201-assignment-01-Solution-Spring-2021.pdf

Jazak Allah Khair <3

#cs201assignment1solution2021 #cs201assignmentsolution
CS201 Assignment 1 Solution Spring 2021 | CS201 Assignment Solution 2021

CS201 Assignment No.1 Solution with complete Explanation || C++ Assignment No1 for VU Students

CS201 Assignment 1 Solution Spring 2021

#CS201_Assignment #CS201_Assignment_1_solution #CS201_Assignment_1_solution_spring_2021
CS201 Assignment 1 solution || Spring 2021

CS201 Assignment 1 Solution Spring 2021 File 

Click on the below link to download the file

CS201 Assignment 1 Solution Spring 2021

Solution of Assignment No 01 Spring 2021 CS201 (Introduction to Programming)

CS201 Assignment 1 Solution Spring 2021 By Maria Parveen |CS201 Assignment 1 Spring 2021|VU Learning

CS201 ASSIGNMNET NO 1-SP 2021

NAME:_________

ID:____________

 

#include <iostream>

using namespace std;

int main()

{

cout" ---HADI VU PAST PAPER---"endl;

cout" "endl;

int x,y,Z;

x=2;

y=1;

Z = (x*x)+(2*y*x)-(x/y);

cout"After evaluation of given expression the value of z = "Zendl;

string ID = "BC";

int id1 = 190202640;

string name = "TEAM HADI(VU LAHORE) 03087122922";

int lastdigit;

int Gotnumber;

lastdigit = id1 % 10;

cout"--Last digit of VU ID is "lastdigitendl;

Gotnumber = Z + lastdigit;

string test;

int n = 1;

if ((lastdigit % 2) == 0)

{

test = "even";

cout"I got an "test" number "Gotnumberendl;

while (n <= Gotnumber)

{

cout"Iteration: "nendl;

cout"My name is "nameendl;

n++;

}

}

else

{

test = " odd";

cout"I got an "test" number "Gotnumberendl;

while(n <= Gotnumber)

{

cout"Iteration: "nendl;

cout"My VU ID is "id1endl;

n++;

}

}

return 0;

}

 

CS201 Assignment No 1 Solution Spring 2021 Complete Correct Solved

RSS

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

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