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

Sta301 Grand Quiz

Sta301 Grand Quiz Download  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 assignments with paramount importance as happy students are our primary goal. Our services are the most affordable, trustwo...

PAK301 GDB 1 Solution Fall 2022

     PAK301 GDB 1 Solution Fall 2022  DownLoad PURPOSE OF VUPORTAL865.COM Virtual university is Providing quality of Education in Asian nation and Overseas too. Thousands of scholars obtaining quality education. Virtual University of {pakistan|Pakistan|Islamic Republic of {pakistan|Pakistan|Islamic Republic of Asian nation|West Pakistan|Asian country|Asian nation}|West Pakistan|Asian country|Asian nation} is initial university In Pakistan that providing on-line education to everybody in Pakistan. during this university on-line Education is straightforward and reasonable for everybody. Most students realize bother planning time for his or her assignments since the analysis work may be a long activity. Even so, others realize bother writing their assignment because of an absence of writing skills. Such students have to be compelled to worry no additional since there ar many accessible on-line assignment facilitate websites. As such, this text provides the highest ten m...