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

Replies to This Discussion

CS201 Assignment 1 Solution Guideline - Spring 2021. First Assignment has been uploaded and the due date is 20th May 2021. #cs201​ #spring2021​ #cs201assignment​
Here is complete CS201 Assignment 1 Solution Guideline - Spring 2021. This time first assignment is based on first 6 lectures.
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.

Share the Assignment Questions & Discuss Here.... 

Stay touched with this discussion, Solution idea will be uploaded as soon as possible in replies here before the due date.

CS201 Assignment 1 Solution Spring 2021 ||Introduction to Programming|| C++ Coding

CS201 Assignment No. 1 Spring 2021 100% Correct Complete Solution By Abid Farooq Bhutta. CS201 Assignment 1 Complete Correct Solution Solved 2021 || Spring 2021 CS201 Solution Assignment no.1 2021 || Complete Correct Spring 2021 Solved. CS201 Assignment 1 Complete Solution Spring 2021,CS201 Assignment 1 Complete Solution,CS201 Assignment 1,CS201 ,CS201 Assignment 1 solution,CS201 assignment Spring 2021,CS201 assignment solution Spring 2021,CS201 assignment, Assignment 1 CS201 solution, solution CS201 Assignment 1, CS201 Assignment 1 solution 2021,CS201 assignment solution 2021,CS201 Assignment 1,CS201 Assignment 1 solution Spring 2021,CS201 Assignment no 1 solution Spring 2021,CS201 Assignment no 1 solution 2021,CS201 1rd assignment solution 2021,CS201 1rd assignment solution,CS201 1st assignment solution Spring 2021,assignment solution Spring 2021, #CS201​ #CS201assignment1solution2021

******

#include <iostream>
using namespace std;
//BC.............
int main(){
int x = 2, y = 1;
int z = x*x +2*x*y +x/y;
cout"After the evalution of given expression the value of z = "zendl;
cout"Last digit of my ID is 1"endl;
int result = z+1;
cout"I got an odd number of "resultendl;
if(result%2==0){
for(int i=1; i<=result; i++){
couti" My Vu id is BC........."endl;
}
}
else if(result%2!=0){
for(int i=1; i<=result; i++){
couti" My Vu id is BC.......... "endl;
}
}
return 0;
}

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

CS201 Assignment 1 Solution 2021

CS201 – Introduction to Programming


Assignment No.  1
Semester: Spring 2021

Instructions

Please read the following instructions carefully before submitting assignment:

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

  • Assignment is submitted after due date.
  • Submitted assignment does not open or file is corrupt.
  • Assignment is copied (From internet/students).

Recommended tool to develop Assignment

  • Dev C++

Objectives:

To enable students to understand and practice the concepts of:

  • Data Types and Variables
  • Arithmetic and Logical Operators
  • Expression solving
  • If-else statements
  • repetition structure

Assignment Submission Instructions

You have to submit only.cpp file on the assignments interface of CS201 from your LMS account. Assignment submitted in any other format will be scaled with zero markSo, check your solution file format before submission.

For any query related to assignment, please contact cs201@vu.edu.pk.

                                            Lectures: 1 to 6

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

  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.

Sample screen shot::


  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.

Sample screen shot::


NOTE: Values of “z” and “student’s id” are arbitrary (not real).

If you face an error while doing this assignment Here is a YouTube video for this assignment.

#cs201 #assignament_1_2021 #cs201_assignment
cs201 assignment 1 solution 2021

CS201 Assignment 01 Spring 2021 Solution

#include <iostream>
using namespace std;
main()
{
int x,y,z, vid=6,i=1;
x=2; y=1;
z= x*X + 2*x*y-x/y;
cout"After evalution of expression z values is :" zend1;
cout"Last digit of my vu id is :" vidend1;
vid= vid +z;
if(vid%2==1)
{
cout "i got an odd number "vidend1;
while(i<=vid)
{
cout "iteration :"iend1;
cout"my vu is id BC200202206"end1;
i++;
}
}
else
{
cout "i got an even number "vidend1;
while(i<=vid)
{
cout" iteration :"iend1;
cout"my name is Fatima "end1;
i++;
}
}

}

Download Assignment Solution File in CPP Fomat

CS201-Assignment%2301-Solution-Spring-2021.cpp

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