Lab No 7
Lab No 7
LAB: 07
Programming Fundamentals
Task#1:
#include<iostream>
using namespace std;
int main()
{
float fahr, Celsius;
char option;
return 0;
}
Output :
Task#2:
#include<iostream>
using namespace std;
int main ()
{
int a , b;
char opt;
cout<<"Enter first Second number : " <<endl;
cin >> a;
cout <<"Enter Second numbe : " << endl;
cin >> b;
cout << "Enter operation + or - or * or / : " <<endl;
cin >> opt ;
if (opt == '+')
cout << "Sum = "<< a + b << endl;
return 0;
}
Output:
Task#3:
#include<iostream>
using namespace std;
// Driver Code
main()
{
//variables
float aside, bside, cside;
//enter side a
cout<<"enter the length of side a "<<endl;
cin>>aside;
//enter side b
cout<<"enter the length of side b "<<endl;
cin>>bside;
//enter side c
cout<<"enter the length of side c "<<endl;
cin>>cside;
return 0;
}
Output: