# CS201 Assignment 1 Solution 2022 - VU Answer

Get Perfect CS201 Assignment Solution 2022 PDF. Students Easily Download CS201 Introduction to Programming Assignment Solution File from VU Answer.

Please Check Below for the Latest CS201 Assignment

CS201 ASSIGNMENT 1 SOLUTION SPRING 2022

Due Date: 10 June 2022

Total Marks: 20

Check Also:

CS201 Midterm Solved Past Papers by Moaaz

CS201 Short Notes Midterm

CODE Solution:

#include<iostream>

using namespace std;

int main(){

string studentName = "Muhammad Sarim"; // Student Name

string VU_ID = "BC210201234"; // Student ID

int NumberOfCourses = 6, firstDigitsOfVUID = 2; // Number of Courses and First Digit of VUID

int sum = 0, iter = 1;

sum = NumberOfCourses + firstDigitsOfVUID; // Sum of Courses and VUID

cout<<" My name is "<<studentName<<endl;

cout<<" My VU ID is "<<VU_ID<<endl;

cout<<"\n \n Courses list in current semester"<<endl;

cout<<" 1. Introduction to Programing"<<endl; // Course 1

cout<<" 2. Introduction to Computing"<<endl; // Course 2

cout<<" 3. Introduction to Programing (Practical)"<<endl; // Course 3

cout<<" 4. Digital Logical Design"<<endl; // Course 4

cout<<" 5. Digital Logic Design (Practical)"<<endl; // Course 5

cout<<" 6. English Compulsory"<<endl; // Course 6

cout<<"\n\n Total number of courses = "<<NumberOfCourses<<endl;

cout<<" First digit of VU ID = "<<firstDigitsOfVUID<<endl;

cout<<" Sum of First digit of VUID and total courses = "<<sum<<"\n\n"<<endl;

while ( iter <= sum)

{

cout<<" "<<iter<<": Welcome to CS201-Introduction to Programming"<<endl;

iter ++;

}

return 0;

}