Professional Documents
Culture Documents
1) A) This Programme Compares Which Number Is Larger Than The Other
1) A) This Programme Compares Which Number Is Larger Than The Other
1) A) This Programme Compares Which Number Is Larger Than The Other
#include <iostream>
using namespace std;
{
int num1=0.0;
int num2=0.0;
if (num1>num2)
else if (num2>num1)
cout <<" Larger to smaller number is:\t" << num2<<" \t"<< num1
<<endl;
system ("pause");
int main ()
{
int a=1, b=1, c ;
if (c = (a-b))
cout << " The value of c is : " << c ;
return 0 ;
}
Q2)a)
#include <iostream>
using namespace std;
int main(void)
{
cout<<"enter your name"<<endl;
char name[10];
cin >> name;
cout << " Hello:\t " << name << endl;
system ("pause");
Q2)b)
#include <iostream>
using namespace std;
{
int N=0.0;
float X=0.0;
int total=0.0;
}
Q2)c)
#include <iostream>
using namespace std;
{
int inches=0.0;
double cm=0.0;
}
Q3)
#include <iostream>
using namespace std;
{
double f;
double c;
int pi=3.14;
double Xc;
Xc= 1/(2*pi*c*f);