You are on page 1of 8

AIR UNIVERSITY

DEPARTMENT OF ELECTRICAL & COMPUTER ENGINEERING

EXPERIMENT NO 1

Lab Title Introduction to Programming


Student Name: Junaid Waqas Reg. No: 210781

Objective: The main objective of this lab is to understand about the DevC++ software.
And also know about the different data types in DevC++.

LAB ASSESSMENT:

Excellent Good Average Satisfactory Unsatisfactory


Attributes
(5) (4) (3) (2) (1)
Ability to Conduct
Experiment
Ability to assimilate the
results
Effective use of lab
equipment and
follows the lab safety
rules

Total Marks: Obtained Marks:

LAB REPORT ASSESSMENT:


Excellent Good Average Satisfactory Unsatisfactory
Attributes
(5) (4) (3) (2) (1)

Data presentation

Experimental results

Conclusion

Total Marks: Obtained Marks:

Date: Signature:
BCE-IA Introduction to Programming

Lab Report: 2
Introduction to Programming

Submitted By,

Junaid Waqas

Roll Number
210781

Submitted To:
Engr. Mariam Sabir

Date: February 12, 2022

2
BCE-IA Introduction to Programming

 LAB TASK:
 Write a Program using DEVC++ (Software) and also understand the basic
Operations.
 Write header files at the top of Program.
 Write the program by using extraction operators with terminators at the Last
while keeping in view the other symbol.
 Perform any arithmetic operation in DevC++.
 CODE:
#include<iostream>
using namespace std;
int main ()
{
float a=3.5;
float b=4.6;
float c;
c=a+b;
cout<<a<<"+"<<b<<"="<<c<<endl;
return 0;
}

 OUTPUT:

4
BCE-IA Introduction to Programming

 LAB TASK:
 Write a Program using DEVC++ (Software) and also understand the basic
Operations.
 Write header files at the top of Program.
 Write the program by using extraction operators with terminators at the Last
while keeping in view the other symbol.
 CODE:
#include<iostream>
using namespace std;
int main()
{
int a;
int b;
int c;
cout<<"Enter 1st number:";
cin>>a;
cout<<"Enter 2nd number:";
cin>>b;
c=a/b;
cout<<a<<"/"<<b<<"="<<c;
}
 OUTPUT:

5
BCE-IA Introduction to Programming

 LAB TASK:
 Write a Program using DEVC++ (Software) and also understand the basic
Operations.
 Write header files at the top of Program.
 Write the program by using extraction operators with terminators at the Last
while keeping in view the other symbol.
 CODE:
#include<iostream>
using namespace std;
int main()
{
int a;
int b;
int c;
cout<<"Enter 1st number:";
cin>>a;
cout<<"Enter 2nd number:";
cin>>b;
c=a+b;
cout<<a<<"+"<<b<<"="<<c;
}
 OUTPUT:

6
BCE-IA Introduction to Programming

 CODE:
#include<iostream>
using namespace std;
int main()
{
int a;
int b;
int c;
cout<<"Enter 1st number:";
cin>>a;
cout<<"Enter 2nd number:";
cin>>b;
c=a-b;
cout<<a<<"-"<<b<<"="<<c;
}

 OUTPUT:

7
BCE-IA Introduction to Programming

 CODE:
#include<iostream>
using namespace std;
int main()
{
int a;
int b;
int c;
cout<<"Enter 1st number:";
cin>>a;
cout<<"Enter 2nd number:";
cin>>b;
c=a*b;
cout<<a<<"*"<<b<<"="<<c;
}

 OUTPUT:

8
BCE-IA Introduction to Programming

 CONCLUSIONS:
After performing this lab, we are able to Perform any Arithmetic
++
operation in DevC without giving an input and also by giving an Input. We are able to
understand the different Data Types used in the DevC++.

You might also like