Skip to main content

CS201 Assignment no 1 C++

 

Assignment No.  1
Semester: Spring 2021

CS201 – Introduction to Programming

Total Marks: 20

 

Due Date:20th May 2021

Instructions

Please read the following instructions carefully before submitting assignment:

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

 

o        Assignment is submitted after due date.

o        Submitted assignment does not open or file is corrupt.

o        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 mark. So, check your solution file format before submission.

 

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

Solution


#include <iostream>

using namespace std;

main()

{

cout<<"\tCS201 Assignment 1 Solution Spring 2021 (VUPORTAL.COM)" <<endl;

// Solving Expression

int x, y, z;

x=2,

y = 1;

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

cout<< "After evalution of given exression the value of z =" << z << endl;

//student 10 and Anylizing

string ID = "BC";

int id2 = 123456782;

string Name = "VUPORTAL.COM";

int lastdigit;

int Gotnumber;

//Evaluation of ID

lastdigit = id2 % 10;

cout<<"Last Digit of my VU ID is " << lastdigit << endl;

Gotnumber = 2 + lastdigit;

// If eLse Loop

// Adding Last digit of ID and Z and print resuLt Odd or Even

string test;

int n = 1;

if ((lastdigit % 2) == 0)


{

test = " even";

cout<< "I got an" << test << "number"<<Gotnumber <<endl;

while (n <= Gotnumber)

//cout<<"\tCS201 Assignment 1 Solution Spring 2021 (VUPORTAL.COM)" <<endl;

{

cout << "Iteration:" << n <<endl;

cout <<"My Name is: " <<Name <<endl;

n++;

}

}

else

{

test = "odd";

cout<<"I got an" <<test <<"number"<<Gotnumber <<endl;

//VUPORTAL.COM


while (n <= Gotnumber)

{

cout << "Iteration:" <<n <<endl;

cout <<"My Vu ID is:" <<ID <<id2 <<endl;

n++;

cout<<"\tCS201 Assignment 1 Solution Spring 2021 (VUPORTAL.COM)" <<endl;

}

}

}

if u need Unique Assignment File u can whatsapp 

03235459470




Solution File


 





Comments

Popular posts from this blog

cs610

                                                                cs610

MTH603 Assignment 1 Solution Spring 2021

               MTH603-Assignment 1 Solution Spring 2021     Download File PURPOSE OF VUPORTAL865.COM Virtual university is Providing quality of Education in Pakistan and Overseas too. Thousands of Students getting quality education. Virtual University of Pakistan is first university In Pakistan that providing online education to everyone in Pakistan. in this university online Education is easy and Affordable for everyone. Most students find trouble scheduling time for their assignments since the research work is a time-consuming activity. Even so, others find trouble writing their assignment due to a lack of writing skills. Such students need to worry no more since there are several available online assignment help websites. As such, this article provides the top 10 most trusted online assignment help websites that ensure that students get the best out of their assignment help services. We take your ...

MTH-403 Assignment no1 Spring 2021

                 MTH-403 Assignment no1 Spring 2021 ASSIGNMENT#1(MTH-403) Spring 2021          Total marks: 10      Due Date: 12 May, 2021     DON’T MISS THESE : Important instructions before attempting the solution of this assignment: ●        To solve this assignment, you should have good command over 1-8 lectures . ●        Try to get the concepts, consolidate your concepts which you learn in these lectures with these questions. ●        Upload assignments properly through LMS, No Assignment will be accepted          through email. ●        Write your ID on the top of your solution file. ●        Don’t use colorful back grounds in your solution files. ●    ...