Q1 write a program to enter the radius of a circle and display the area. use constant pi=3.14
Q2write a program to enter 3 numbers and dispaly the largest
Q3
write a program to enter the roll no. , name %26amp;marks in 3 subjects
Please help me
C++ help!!!!!!!!!!!!!!!!!!!!!!!!!!...
#include%26lt;iostream%26gt;
using namespace std;
int main()
{
double r,A;
cout%26lt;%26lt;"enter the radius\n"
cin%26gt;%26gt;r;
A=2*(3.14)(r);
cout%26lt;%26lt;A;
return 0;
}
q2:
#include%26lt;iostream%26gt;
using namespace std;
int main()
{
cin%26gt;%26gt;a;
cin%26gt;%26gt;b;
cin%26gt;%26gt;c;
if (a%26gt;b %26amp;%26amp; a%26gt;c)
cout%26lt;%26lt;"a isthe largest \n ";
else if(b%26gt;a %26amp;%26amp; b%26gt;c)
cout%26lt;%26lt;"b is the largest\n";
else
cout%26lt;%26lt;"c is the largest";
return 0;
}
wedding
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment