CS201 ASSIGNMENT 1 SOLUTION 2021 | CS201 ASSIGNMENT 1 FALL 2021 | CS201 ASSIGNMENT 1 2021 | INTRODUCTION TO PROGRAMMING | VuTech |
KINDLY, DON’T COPY PASTE
Visit Website For More Solutions
www.vutechofficial.blogspot.com
#include <iostream>
using namespace std;
int main ()
{
int p = 2;
int q = 0;
int r = 6;
int sum = 0;
int i = 1;
cout<<"\n My Name is VuTech\n"<<endl;
cout<<"\n ID of VuTech is = MC123456 \n"<<endl;
sum = p + q + r;
cout<<"\n sum of last 3 digits is = " << sum <<endl;
if (sum%2==1)
{
cout<<"\n Value of Sum is odd\n"<<endl;
cout<<"\n ++++++++++++++++++++++\n"<<endl;
while (i<=sum)
{
cout<<" iteration : "<<i <<endl;
cout<<"My Name is VuTech"<<endl;
i++;
}
}
else
{
cout<<"\n Value of Sum is even\n"<<endl;
cout<<"\n ++++++++++++++++++++++\n"<<endl;
while (i<=sum)
{
cout<<" iteration : "<<i <<endl;
cout<<"ID of VuTech is = MC123456"<<endl;
i++;
}
}
}