About Us

Welcome to FEARPK, your number one source for all things about education. We’re dedicated to providing you the very best of knowledge, with an emphasis on formal and non formal education.

 

Founded in  3, March 2019 by Rehmat Ullah, FEARPK has come a long way from its beginnings in Pakistan. When Rehmat ullah first started out, his passion for educational services  drove them to start their own business.

 

We hope you enjoy our educational knowledge as much as we enjoy offering them to you. If you have any questions or comments, please don’t hesitate to contact us.

 

Sincerely,

Rehmat Ullah

cs201 assignment 1 soloution spring 2021

?php the_post_thumbnail(); ?
cs201 assignment 1 soloution spring 2021

cs201 assignment 1 soloution spring 2021

 

CS201 ASSIGNMENT 1 SOLUTION

SPRING 2021

BY WWW.FEARPK.COM

SOLUTION

Note: Do not copy and paste. Please change your id and name and comments properly according to programing rules.

#include <iostream>



using namespace std;

 

int main()

{

cout<<”     —CS201 ASSIGNMENT 1 SOLUTION 1 SPRING 2021—-“<<endl;

cout<<”     —Program by MUHAMMAD REYAN—-“<<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 = “<<Z<<endl;

 

string ID = “BC”;

int id2 = MC110202087; // remove and enter any student id here (not real)

string name = “CH RAYAN”; // enter your name into my name

int lastdigit;

int Gotnumber;

 



lastdigit = id2 % 10;

cout<<“–Last digit of VU ID is “<<lastdigit<<endl;

Gotnumber = Z + lastdigit;

 

// using if else condition

string test;

int n = 1;

if ((lastdigit % 2) == 0)

{

test = “even”;

cout<<“I got an “<<test<<” number “<<Gotnumber<<endl;

while (n <= Gotnumber)

{

cout<<“Iteration: “<<n<<endl;

cout<<“My name is “<<name<<endl;

n++;

}

}

else

{

test = ” odd”;

cout<<“I got an “<<test<<” number “<<Gotnumber<<endl;

while(n <= Gotnumber)

{

cout<<“Iteration: “<<n<<endl;

cout<<“My VU ID is “<<id2<<endl;

n++;

}

}

 

return 0;

}

 



Muhammad Reyan

Leave a Reply

Your email address will not be published. Required fields are marked *