C++ Lab Report
C++ Lab Report
ASSIGNMENT # 1
Computing Fundamental
This assignment is composed of four questions done in C++ 4.5. the .cpp files are
attached with this softcopy.
Bahria University
Asadullah Baig
01-133102-021
BEE-2(A)
Question #1
#include<iostream.h>
void main()
{ //main starts
cin>>temperature;
}
Question #2
#include<iostream.h>
void main()
int size;
space--;
stars=stars+2;
if(i>=size/2) //if its the bottom half of the diamond this will run
} //end of for
} //end of main
Question #3
#include<iostream.h>
void main()
{double s1,s2,s3,s4,s5,t1,t2,t3,t4,t5,s,t,et,eo;
cin>>t1;
cin>> s1;
cin>>t2;
cin>> s2;
cin>>t3;
cin>> s3;
cin>>t4;
cin>> s4;
cout<<"enter the total marks in subject 5 ";
cin>>t5;
cin>> s5;
s=s1+s2+s3+s4+s5;
t=t1+t2+t3+t4+t5;
cin>>et;
cin>>eo;
t=(s/t)*60;
t=t+((eo/et)*40);
cout<<t<<"%";
}
Question #4
#include<iostream.h>
#include<conio.h>
void main()
{ //start of main
y++;
} //end of while
cout<<total; //displaying
} //end of main