In: Computer Science
VISUAL STUDIO (File Creation and Submissions)
FLOWCHART
Writing program in C++ ( cout, \n, \t, solving expressions
)
Correcting errors
Q1: Draw flow Chart of the following problems:
a) Display “Hello World” on screen.
b) Display Your Name, date of birth and mobile number on
screen.
c) Compute and display the perimeter and area of a rectangle with a
height of 7 inches and width
of 5 inches.
d) Compute and display the perimeter and area of a circle with a
radius of 6 inches.
e) Compute and display the sum of a=1245698 and b=12345.
f) Read an employee's ID, total worked hours of a month and the
amount he received per hour.
Print the employee's ID and salary of a particular month
Test Data:
Input the Employees ID: 0342
Input the working hours: 8
Salary amount/hour: 15000
Expected Output:
Employees ID = 0342
Salary = RS. 120000.00
g) Read two item’s weight and number of purchase and calculate the
average value of the items
Test Data:
Weight of Item1: 15
No. of item1: 5
Weight of Item2: 25
No. of item2: 4
Expected Output:
Average Value = 19.444444
Q2: Practice the following on Visual Studio:
a) Create a blank C++ file using Microsoft Visual Studio
b) Create and save a cpp File in default
directory
c) Create and save a cpp file in any location other than default
location
d) Upload the test file for submission on portal.
Q3: Write C++ programs for the following problems.
a) Display Hello World message on screen.
Expected Output:
Hello World
b) Display Your Name, date of birth and mobile number on screen
separated by comma as follows:
Expected Output:
Ahmad, 5-06-1995, 0321-5673451
c) Display a horizontal line of ten consecutive asterisks on screen
as follows:
Expected Output:
**********
d) Display ITC LAB 1 on screen enclosed in single quotes as
follows:
Expected Output:
‘ITC LAB 03’
e) Display ITC LAB 1 on screen enclosed in double quotes as
follows:
Expected Output:
“ITC LAB 03”
Q4: Write the following lines of codes one by one as it is and then
analyze the output:
a) cout<< ‘This is my first ITC lab ‘
b) //cout<< ‘This is my first ITC LAB’
c) cout>> “987654321”;
d) cout<<” 9876
54321”;
e) cout<<” 9876”
“54321”;
f) cout<<” 9876”;
cout<<54321;
g) cout<<”test\t\test1”;
h) cout<<” ###### \n ****** \n
&&&&&&”;
i) cout<<” ###### \n &&&\t&&&”;
j) cout<<” 25+35”;
k) cout<< 100 + 200 ;
l) cout<<”40 * 3”;
cout<<”=”;
cout<<40*3;
m) cout<<10/5;
n) cout<<5/10;
o) cout<< k;
Hi there, due to limited time and so many subpargs under one question i have solved only first question, for remaining please repost.
If you need any further help do comment I'll be happy to help you further.
I have draw flowchart by considering general assumption if you want only to enter special value put values in there as per your question.
I have also shown this for part e how to do that.