1st Task Assignment No 2 Two Pages....
1st Task Assignment No 2 Two Pages....
Task#1:
#include<iostream>
using namespace std;
int main()
{
float fahr, cel;
char option;
return 0;
}
Output :
Choose from following option :
1 . Celsius to Fahrenheit .
2 . Fahrenheit to Celsius .
1
Enter the temperature in Celsius :
10
Temperature in degree Fahrenheit : 50F
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;