You are on page 1of 3

Name-Linn Latt Sandar Myint

Roll no-1801

Section-A (1st yr, sec sem)

1.

#include <iostream>

using namespace std;

int main()

//1 cubic foot=7.481 gallons;

float gl;

cout<<"Enter the numbers of gallons :";

cin>>gl;

float ans=gl/7.481;

cout<<"There are " <<ans<<" gallons"<<" in "<<gl<<" gallons"<<endl;

return 0;

2.

#include <iostream>

#include <ctype.h>

using namespace std;

int main()

char letter;

int result;

cout<<"Enter a letter : ";

cin>>letter;

result=islower(letter) ;

cout<<result<<endl;

return 0;
}

3.

#include <iostream>

using namespace std;

int main (){

float british=1.487;

float french=0.172;

float german=0.584;

float japanese=0.00955;

float d;

cout<<"Enter the amount of dollars : ";

cin>>d;

float ans1=d*british;

cout<<"The british unit in "<<d<<" dollars "<<ans1 ;

float ans2=d*french;

cout<<"\n The french unit in "<<d<<" dollars "<<ans2 ;

float ans3=d*german;

cout<<"\n The german unit in "<<d<<" dollars "<<ans3 ;

float ans4=d*japanese;

cout<<"\n The japanese unit in "<<d<<" dollars "<<ans4 ;

return 0;

4.

#include <iostream>

using namespace std;

int main(){

float f,c;
cout<<"Enter celcius number :";

cin>>c;

f=(c*9/5)+32;

cout<<"Celcius to Fahrenheit degree is "<<f<<endl;

return 0;

5.

#include <iostream>

#include <iomanip>

using namespace std;

int main()

cout<<"Portcity"<<setfill('.')<<setw(12)<<2425785<<endl;

return 0;

}6.

#include <iostream>

using namespace std;

int main(){

//1 mile=1.609 kilometers

float m;

float ans;

cout<<"Enter the number of miles :";

cin>> m;

ans=m*1.609;

cout<<"There are "<<ans<<" kilometers in "<<m<<" miles" ;

return 0;

You might also like