Deprecated: Optional parameter $i declared before required parameter $data is implicitly treated as a required parameter in /home4/aipsa9vw/public_html/blogs/wp-content/themes/voice/include/modules.php on line 4

Deprecated: Optional parameter $i declared before required parameter $data is implicitly treated as a required parameter in /home4/aipsa9vw/public_html/blogs/wp-content/themes/voice/include/modules.php on line 245

Deprecated: Optional parameter $output declared before required parameter $attr is implicitly treated as a required parameter in /home4/aipsa9vw/public_html/blogs/wp-content/themes/voice/include/snippets.php on line 431

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home4/aipsa9vw/public_html/blogs/wp-content/themes/voice/include/mega-menu.php on line 147

Warning: Cannot modify header information - headers already sent by (output started at /home4/aipsa9vw/public_html/blogs/wp-content/themes/voice/include/modules.php:4) in /home4/aipsa9vw/public_html/blogs/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /home4/aipsa9vw/public_html/blogs/wp-content/themes/voice/include/modules.php:4) in /home4/aipsa9vw/public_html/blogs/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /home4/aipsa9vw/public_html/blogs/wp-content/themes/voice/include/modules.php:4) in /home4/aipsa9vw/public_html/blogs/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /home4/aipsa9vw/public_html/blogs/wp-content/themes/voice/include/modules.php:4) in /home4/aipsa9vw/public_html/blogs/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /home4/aipsa9vw/public_html/blogs/wp-content/themes/voice/include/modules.php:4) in /home4/aipsa9vw/public_html/blogs/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /home4/aipsa9vw/public_html/blogs/wp-content/themes/voice/include/modules.php:4) in /home4/aipsa9vw/public_html/blogs/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /home4/aipsa9vw/public_html/blogs/wp-content/themes/voice/include/modules.php:4) in /home4/aipsa9vw/public_html/blogs/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /home4/aipsa9vw/public_html/blogs/wp-content/themes/voice/include/modules.php:4) in /home4/aipsa9vw/public_html/blogs/wp-includes/rest-api/class-wp-rest-server.php on line 1902
{"id":44,"date":"2022-08-21T08:19:31","date_gmt":"2022-08-21T08:19:31","guid":{"rendered":"https:\/\/aipsacademy.com\/blogs\/?p=44"},"modified":"2023-07-28T02:14:24","modified_gmt":"2023-07-28T02:14:24","slug":"c-basic-program-for-11th-computer-science","status":"publish","type":"post","link":"https:\/\/aipsacademy.com\/blogs\/2022\/08\/21\/c-basic-program-for-11th-computer-science\/","title":{"rendered":"C++ Basic Program for 11th Computer Science"},"content":{"rendered":"\n

<\/p>\n\n\n\n

<\/p>\n\n\n\n

Basic Format of C++ Program<\/strong><\/h4>\n\n\n\n
#include<iostream.h>\n#include<conio.h>\nvoid main()  \n{\nclrscr();\t\t\n.............\n\n.............\ngetch();\n}<\/code><\/pre>\n\n\n\n

<\/p>\n\n\n\n

C++ Program <\/strong> to Print Name and Address<\/h4>\n\n\n\n
#include<iostream.h>\n#include<conio.h>\nvoid main()  \n{\nclrscr();\t\t\ncout<<\"AIPS ACADEMY\";\ncout<<\"\\n Abadganj\";\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

AIPS ACADEMY
Abadganj<\/p>\n\n\n\n

<\/p>\n\n\n\n

OR<\/p><\/blockquote>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()  \n{\nclrscr();\t\t\ncout<<\"AIPS ACADEMY\\n\";\ncout<<\"Abadganj\";\ngetch();\n}\n<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

AIPS ACADEMY
Abadganj<\/p>\n\n\n\n

OR<\/p><\/blockquote>\n\n\n\n

<\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()  \n{\nclrscr();\t\t\ncout<<\"AIPS ACADEMY\"<<endl;\ncout<<\"Abadganj\";\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

AIPS ACADEMY
Abadganj<\/p>\n\n\n\n

OR<\/strong><\/p><\/blockquote>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()  \n{\nclrscr();\t\t\ncout<<\"AIPS ACADEMY\";\ncout<<endl<<\"Abadganj\";\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

AIPS ACADEMY
Abadganj<\/p>\n\n\n\n

<\/p>\n\n\n\n

<\/p>\n\n\n\n

OR<\/strong><\/p><\/blockquote>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()  \n{\nclrscr();\t\t\ncout<<\"AIPS ACADEMY \\nAbadganj\";\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

AIPS ACADEMY
Abadganj<\/p>\n\n\n\n

<\/p>\n\n\n\n

OR<\/p><\/blockquote>\n\n\n\n

\/*  Q. write a program to print your Name.\n      and Address.  *\/\n#include<iostream.h>\n#include<conio.h>\nvoid main()  \/\/ indicates Starting of program\n{\nclrscr();\t\t\/\/to clear the screen\ncout<<\"AIPS ACADEMY\";\ncout<<\"\\n Abadganj\";\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

AIPS ACADEMY
Abadganj<\/p>\n\n\n\n

C++ Program <\/strong>#Find sum of two numbers.<\/h4>\n\n\n\n

<\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat a,b,c;\na=10;\nb=5;\nc=a+b;\ncout<<\"Sum=\"<<c;\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

Sum=15<\/p>\n\n\n\n

OR<\/p><\/blockquote>\n\n\n\n

<\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat a,b;\na=10;\nb=5;\ncout<<\"Sum=\"<<(a+b);\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

Sum=15<\/p>\n\n\n\n

<\/p>\n\n\n\n

<\/p>\n\n\n\n

OR<\/p><\/blockquote>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat x,y,z;\nx=10;\ny=5;\nz=x+y;\ncout<<\"Sum=\"<<z;\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

Sum=15<\/p>\n\n\n\n

<\/p>\n\n\n\n

<\/p>\n\n\n\n

OR<\/p><\/blockquote>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat n1,n2,n3;\nn1=10;\nn2=5;\nn3=n1+n2;\ncout<<\"Sum=\"<<n3;\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

Sum=15<\/p>\n\n\n\n

<\/p>\n\n\n\n

C++ Program <\/strong>#Find subtraction of two numbers.<\/h4>\n\n\n\n
#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nint a,b,c;\na=10;\nb=5;\nc=a-b;\ncout<<\"Sub=\"<<c;\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

Sub=5<\/p>\n\n\n\n

C++ Program <\/strong>#Find Multiplication of two numbers.<\/h4>\n\n\n\n
#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat a,b,c;\na=10;\nb=5;\nc=a*b;\ncout<<\"Multiplication=\"<<c;\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

Multiplication=50<\/p>\n\n\n\n

C++ Program <\/strong>#Find division of two numbers.<\/h4>\n\n\n\n
#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat a,b,c;\na=5;\nb=2;\nc=a\/b;\ncout<<\"Division=\"<<c;\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

Division=2.5<\/p>\n\n\n\n

C++ Program <\/strong>#Find Integer division of two numbers.<\/h4>\n\n\n\n

<\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nint a,b,c;\na=10;\nb=3;\nc=a\/b;\ncout<<\"Integer Division=\"<<c;\ngetch();\n}<\/code><\/pre>\n\n\n\n

<\/p>\n\n\n\n

\n

Output<\/strong><\/p>\n\n\n\n

Integer Division=3<\/p>\n<\/div><\/div>\n\n\n\n

C++ Program <\/strong>#Find Modulo division of two numbers.<\/h4>\n\n\n\n

<\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nint a,b,c;\na=10;\nb=3;\nc=a%b;\ncout<<\"Modulo Division=\"<<c;\ngetch();\n}<\/code><\/pre>\n\n\n\n
\n

Output<\/strong><\/p>\n\n\n\n

Modulo Division=1<\/p>\n\n\n\n

<\/p>\n\n\n\n

Q) What will be result of the following expression s when A=5, B=10 and C=15 ?
a) D=A+ C% B
b) D= A+B*5\u2013 C<\/p><\/blockquote>\n\n\n\n

<\/p>\n\n\n\n

<\/p>\n<\/div><\/div>\n\n\n\n

What will be result of the following expression s when A=5, B=10 and C=15 ?
a) D=B+ C% A
b) D= B \u2013 C \/ A<\/p>\n\n\n\n

<\/p>\n\n\n\n

<\/p>\n\n\n\n

What will be result of the following expression s when A=6, B=7 and C=8 ?
a) D=A + C% B
b) D= A + B *5 – C<\/p>\n\n\n\n

<\/p>\n\n\n\n

What will be result of the following expression s when A=4, B=6 and C=8 ?
a) D=++A + C% ++B
b) D= A + ++B *2 – C<\/p>\n\n\n\n

<\/p>\n\n\n\n

<\/p>\n\n\n\n

C++ Program <\/strong>#Find sum of two numbers. (Compile Time)<\/h4>\n\n\n\n

<\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat a,b,c;\na=10;\nb=5;\nc=a+b;\ncout<<\"Sum=\"<<c;\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

Sum=15<\/p>\n\n\n\n

<\/p>\n\n\n\n

OR C++ Program <\/strong>#Find sum of two numbers. ( Run time<\/strong> )<\/p><\/blockquote>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat a,b,c;\ncout<<\"Enter value of a=\";\ncin>>a;\ncout<<\"Enter value of b=\";\ncin>>b;\nc=a+b;\ncout<<\"Sum=\"<<c;\ngetch();\n}<\/code><\/pre>\n\n\n\n
\n

Output:<\/strong><\/p>\n\n\n\n

Enter value of a =5<\/p>\n\n\n\n

Enter value of b =7<\/p>\n\n\n\n

Sum=12<\/p>\n<\/div><\/div>\n\n\n\n

<\/p>\n\n\n\n

OR Run time<\/strong><\/p><\/blockquote>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat a,b,c;\ncout<<\"Enter value of a and b=\";\ncin>>a>>b;\nc=a+b;\ncout<<\"Sum=\"<<c;\ngetch();\n}<\/code><\/pre>\n\n\n\n
\n

Output:<\/strong><\/p>\n\n\n\n

Enter value of a and b=5<\/p>\n\n\n\n

7<\/p>\n\n\n\n

Sum=12<\/p>\n<\/div><\/div>\n\n\n\n

<\/p>\n\n\n\n

<\/p>\n\n\n\n

C++ Program <\/strong>#Find sum of three numbers.<\/h4>\n\n\n\n

<\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat a,b,c,d;\na=5;\nb=7;\nc=9;\nd=a+b+c;\ncout<<\"Sum=\"<<d;\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output:<\/strong><\/p>\n\n\n\n

Sum=21<\/p>\n\n\n\n

OR Run time<\/strong><\/p><\/blockquote>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat a,b,c,d;\ncout<<\"Enter value of a,b and c=\";\ncin>>a>>b>>c;\nd=a+b+c;\ncout<<\"Sum=\"<<d;\ngetch();\n}<\/code><\/pre>\n\n\n\n
\n

Output:<\/strong><\/p>\n\n\n\n

Enter value of a ,b and c=5<\/p>\n\n\n\n

7<\/p>\n\n\n\n

9<\/p>\n\n\n\n

Sum=21<\/p>\n<\/div><\/div>\n\n\n\n

<\/p>\n\n\n\n

C++ Program <\/strong>#Find Area of Rectangle<\/h4>\n\n\n\n

<\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat l,b,a;\nl=10;\nb=5;\na=l*b;\ncout<<\"Area of Rectangle=\"<<a;\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

Area of Rectangle=50<\/p>\n\n\n\n

<\/p>\n\n\n\n

Run time<\/strong><\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat l,b,a;\ncout<<\"Enter Length and Breadth=\";\ncin>>l>>b;\na=l*b;\ncout<<\"Area of Rectangle=\"<<a;\ngetch();\n}<\/code><\/pre>\n\n\n\n

<\/p>\n\n\n\n

\n

Output<\/strong>
Enter Length and Breadth=10
5
Area of Rectangle=50<\/p>\n\n\n\n

<\/p>\n<\/div><\/div>\n\n\n\n

C++ Program <\/strong>#Find Perimeter of Rectangle<\/h4>\n\n\n\n

<\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat l,b,p;\nl=10;\nb=5;\np=2*(l+b);\ncout<<\"Perimeter of Rectangle=\"<<p;\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

Perimeter of Rectangle=30<\/p>\n\n\n\n

<\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat l,b,p;\ncout<<\"Enter Length and Breadth=\";\ncin>>l>>b;\np=2*(l+b);\ncout<<\"Perimeter of Rectangle=\"<<p;\ngetch();\n}<\/code><\/pre>\n\n\n\n

<\/p>\n\n\n\n

Output<\/strong>
Enter Length and Breadth=10
5
Perimeter of Rectangle=30<\/p>\n\n\n\n

<\/p>\n\n\n\n

C++ Program <\/strong>#Find Area and Perimeter of Rectangle<\/h4>\n\n\n\n

<\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat l,b,a,p;\nl=10;\nb=5;\na=l*b;\np=2*(l+b);\ncout<<\"Area of Rectangle=\"<<a;\ncout<<\"\\nPerimeter of Rectangle=\"<<p;\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

Area of Rectangle=50
Perimeter of Rectangle=30<\/p>\n\n\n\n

Run Time<\/strong><\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat l,b,a,p;\ncout<<\"Enter Length and Breadth=\";\ncin>>l>>b;\na=l*b;\np=2*(l+b);\ncout<<\"Area of Rectangle=\"<<a;\ncout<<\"\\nPerimeter of Rectangle=\"<<p;\ngetch();\n}<\/code><\/pre>\n\n\n\n

<\/p>\n\n\n\n

Output<\/strong>
Enter Length and Breadth=10
5
Area of Rectangle=50
Perimeter of Rectangle=30<\/p>\n\n\n\n

<\/p>\n\n\n\n

C++ Program <\/strong>#Find Area of Square<\/h4>\n\n\n\n

<\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat s,a;\ns=10;\na=s*s;\ncout<<\"Area of square=\"<<a;\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

Area of square=100<\/p>\n\n\n\n

<\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat s,a;\ncout<<\"Enter Side=\";\ncin>>s;\na=s*s;\ncout<<\"Area of square=\"<<a;\ngetch();\n}<\/code><\/pre>\n\n\n\n

<\/p>\n\n\n\n

Output<\/strong>
Enter side=10
Area of square=100<\/p>\n\n\n\n

<\/p>\n\n\n\n

C++ Program <\/strong>#Find Perimeter of Square<\/h4>\n\n\n\n

<\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat s,p;\ns=10;\np=4*s;\ncout<<\"Perimeter of Square=\"<<p;\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

Perimeter of Square=40<\/p>\n\n\n\n

Run Time<\/strong><\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat s,p;\ncout<<\"Enter Side=\";\ncin>>s;\np=4*s;\ncout<<\"Perimeter of Square=\"<<p;\ngetch();\n}<\/code><\/pre>\n\n\n\n

<\/p>\n\n\n\n

Output<\/strong>
Enter side=10
Perimeter of Square=40<\/p>\n\n\n\n

<\/p>\n\n\n\n

<\/p>\n\n\n\n

C++ Program <\/strong>#Find Area and Perimeter of Square<\/h4>\n\n\n\n

<\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat s,a,p;\ns=10;\na=s*s;\np=4*s;\ncout<<\"Area of Square=\"<<a;\ncout<<\"\\nPerimeter of Square=\"<<p;\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

Area of Square=100
Perimeter of Square=40<\/p>\n\n\n\n

Run Time<\/strong><\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat s,a,p;\ncout<<\"Enter Side=\";\ncin>>s;\na=s*s;\np=4*s;\ncout<<\"Area of Square=\"<<a;\ncout<<\"\\nPerimeter of Square=\"<<p;\ngetch();\n}<\/code><\/pre>\n\n\n\n

<\/p>\n\n\n\n

Output<\/strong>
Enter side=10
Area of Square=100
Perimeter of Square=40<\/p>\n\n\n\n

<\/p>\n\n\n\n

Circle<\/p><\/blockquote>\n\n\n\n

+ Program <\/strong>#Find Area of Circle<\/h4>\n\n\n\n

<\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat r,a;\nr=5;\na=3.14*r*r;\ncout<<\"Area of circle=\"<<a;\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

Area of circle=78.5<\/p>\n\n\n\n

<\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat r,a;\ncout<<\"Enter radius=\";\ncin>>r;\na=3.14*r*r;\ncout<<\"Area of circle=\"<<a;\ngetch();\n}<\/code><\/pre>\n\n\n\n

<\/p>\n\n\n\n

Output<\/strong>
Enter radius=5
Area of circle=78.5<\/p>\n\n\n\n

<\/p>\n\n\n\n

C++ Program <\/strong>#Find Perimeter of Circle<\/h4>\n\n\n\n

<\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat r,p;\nr=5;\np=2*3.14*r;\ncout<<\"Perimeter of circle=\"<<p;\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

Perimeter of circle=31.4<\/p>\n\n\n\n

Run Time<\/strong><\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat r,p;\ncout<<\"Enter radius=\";\ncin>>r;\np=2*3.14*r;\ncout<<\"Perimeter of circle=\"<<p;\ngetch();\n}<\/code><\/pre>\n\n\n\n

<\/p>\n\n\n\n

Output<\/strong>
Enter radius=5
Perimeter of circle=31.4<\/p>\n\n\n\n

<\/p>\n\n\n\n

<\/p>\n\n\n\n

C++ Program <\/strong>#Find Area and Perimeter of circle<\/h4>\n\n\n\n

<\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat r,a,p;\nr=5;\na=3.14*r*r;\np=2*3.14*r;\ncout<<\"Area of circle=\"<<a;\ncout<<\"\\nPerimeter of circle=\"<<p;\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

Area of circle=78.5
Perimeter of circle=31.4<\/p>\n\n\n\n

Run Time<\/strong><\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat r,a,p;\ncout<<\"Enter radius=\";\ncin>>r;\na=3.14*r*r;\np=2*3.14*r;\ncout<<\"Area of circle=\"<<a;\ncout<<\"\\nPerimeter of circle=\"<<p;\ngetch();\n}<\/code><\/pre>\n\n\n\n

<\/p>\n\n\n\n

Output<\/strong>
Enter radius=5
Area of circle=78.5
Perimeter of circle=31.4<\/p>\n\n\n\n

<\/p>\n\n\n\n

<\/p>\n\n\n\n

<\/p>\n\n\n\n

<\/p>\n\n\n\n

C++ Program <\/strong>#Find Simple interest<\/h4>\n\n\n\n
#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat p,r,t,s;\np=1000;\nr=5;\nt=3;\ns=(p*r*t)\/100;\ncout<<\"Simple interest=\"<<s;\ngetch();\n}<\/code><\/pre>\n\n\n\n
\n

Output:<\/strong><\/p>\n\n\n\n

Simple interest=150<\/p>\n<\/div><\/div>\n\n\n\n

<\/p>\n\n\n\n

Run time<\/strong><\/p>\n\n\n\n

<\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat p,r,t,s;\ncout<<\"Enter value of P, R and T=\";\ncin>>p>>r>>t;\ns=(p*r*t)\/100;\ncout<<\"Simple interest=\"<<s;\ngetch();\n}<\/code><\/pre>\n\n\n\n
\n

Output<\/strong>
Enter value of P, R and T=1000
5
3
Simple interest=150<\/p>\n<\/div><\/div>\n\n\n\n

<\/p>\n\n\n\n

Write a program in C++ to find the square and cube of entered integer number. (2017)<\/h4>\n\n\n\n

<\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat n,s,c;\nn=5;\ns=n*n;\nc=n*n*n;\ncout<<\"Square=\"<<s;\ncout<<\"\\nCube=\"<<c;\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

Square=25
Cube=125<\/p>\n\n\n\n

OR<\/strong><\/p><\/blockquote>\n\n\n\n

<\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat n;\nn=5;\ncout<<\"Square=\"<<(n*n);\ncout<<\"\\nCube=\"<<(n*n*n);\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

Square=25
Cube=125<\/p>\n\n\n\n

<\/p>\n\n\n\n

Run Time<\/strong><\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat n,s,c;\ncout<<\"Enter any number=\";\ncin>>n;\ns=n*n;\nc=n*n*n;\ncout<<\"Square=\"<<s;\ncout<<\"\\nCube=\"<<c;\ngetch();\n}<\/code><\/pre>\n\n\n\n

<\/p>\n\n\n\n

Output<\/strong>
Enter any number=5
Square=25
Cube=125<\/p>\n\n\n\n

Write a program to enter any two numbers and print the sum, difference and product in separate
line with appropriate message. (2017)<\/h4>\n\n\n\n

<\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat a,b,c,d,e;\na=5;\nb=3;\nc=a+b;\nd=a-b;\ne=a*b;\ncout<<\"Sum=\"<<c;\ncout<<\"\\nDifference=\"<<d;\ncout<<\"\\nProduct=\"<<e;\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

Sum=8
Difference=2
Product=15<\/p>\n\n\n\n

<\/p>\n\n\n\n

OR<\/p><\/blockquote>\n\n\n\n

<\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat a,b;\na=5;\nb=3;\ncout<<\"Sum=\"<<(a+b);\ncout<<\"\\nDifference=\"<<(a-b);\ncout<<\"\\nProduct=\"<<(a*b);\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

Sum=8
Difference=2
Product=15<\/p>\n\n\n\n

OR Run Time<\/p><\/blockquote>\n\n\n\n

<\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat a,b,c,d,e;\ncout<<\"Enter value of a and b=\";\ncin>>a>>b;\nc=a+b;\nd=a-b;\ne=a*b;\ncout<<\"Sum=\"<<c;\ncout<<\"\\nDifference=\"<<d;\ncout<<\"\\nProduct=\"<<e;\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

Enter value of a and b=5
3
Sum=8
Difference=2
Product=15<\/p>\n\n\n\n

OR<\/strong><\/p>\n\n\n\n

<\/p>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat a,b;\ncout<<\"Enter value of a and b=\";\ncin>>a>>b;\ncout<<\"Sum=\"<<(a+b);\ncout<<\"\\nDifference=\"<<(a-b);\ncout<<\"\\nProduct=\"<<(a*b);\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

Enter value of a and b=5
3
Sum=8
Difference=2
Product=15<\/p>\n\n\n\n

Write a Program to find out the sum and average of any four entered numbers. (2015)<\/h4>\n\n\n\n
#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat a,b,c,d,e,f;\na=10;\nb=20;\nc=30;\nd=40;\ne=a+b+c+d;\nf=e\/4;\ncout<<\"Sum=\"<<e;\ncout<<\"\\nAverage=\"<<f;\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

Sum=100
Average=25<\/p>\n\n\n\n

OR <\/p><\/blockquote>\n\n\n\n

#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat a,b,c,d,e,f;\ncout<<\"Enter value of a,b,c and d=\";\ncin>>a>>b>>c>>d;\ne=a+b+c+d;\nf=e\/4;\ncout<<\"Sum=\"<<e;\ncout<<\"\\nAverage=\"<<f;\ngetch();\n}<\/code><\/pre>\n\n\n\n
\n

Enter value of a,b,c and d=10
20
30
40
Sum=100
Average=25<\/p>\n<\/div><\/div>\n\n\n\n

Write a program in C++ to convert the entered temperature in Celsius into Fahrenheit(using
formula: C=5\/9*(F-32)). <\/h4>\n\n\n\n
#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr();\nfloat c,f;\ncout<<\"Enter temperature in Celsius=\";\ncin>>c;\nf=((9*c)+160)\/5;\ncout<<\"Fahrenheit=\"<<f;\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/strong><\/p>\n\n\n\n

\n

Enter temperature in Celsius=37<\/p>\n\n\n\n

Fahrenheit=98.6<\/p>\n<\/div><\/div>\n\n\n\n

Write a program to find Square Root of a number.<\/h4>\n\n\n\n
#include<iostream.h>\n#include<conio.h>\n#include<math.h>\nvoid main()\n{\nclrscr();\nfloat n,r;\ncout<<\"Enter any number=\";\ncin>>n;\nr=sqrt(n);\ncout<<\"Square Root=\"<<r;\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/p>\n\n\n\n

\n

Enter any number=25
Square Root=5<\/p>\n<\/div><\/div>\n\n\n\n

<\/p>\n\n\n\n

Write a program to find Power value.<\/h4>\n\n\n\n
#include<iostream.h>\n#include<conio.h>\n#include<math.h>\nvoid main()\n{\nclrscr();\nfloat b,p,r;\ncout<<\"Enter base and power=\";\ncin>>b>>p;\nr=pow(b,p);\ncout<<\"Power Value=\"<<r;\ngetch();\n}<\/code><\/pre>\n\n\n\n

Output<\/p>\n\n\n\n

Enter base and power=5
3
Power value=125<\/p>\n\n\n\n

Write a program to find Compound interest.<\/h4>\n\n\n\n
#include<iostream.h>\n#include<conio.h>\n#include<math.h>\nvoid main()\n{\nclrscr();\nfloat p,r,t,x,y,z;\ncout<<\"Enter principal,rate and time=\";\ncin>>p>>r>>t;\nx=1+r\/100;\ny=pow(x,t);\nz=y*p-p;\ncout<<\"Compound interest=\"<<z;\ngetch();\n}<\/code><\/pre>\n\n\n\n

Enter principal,rate and time=1000
5
3
Compound interest=1157.625<\/p>\n\n\n\n

C++ Program to Find area Triangle<\/h4>\n\n\n\n

<\/p>\n\n\n\n

C++ Program to Find area Triangle using Hero’s Formula<\/h4>\n\n\n\n

<\/p>\n\n\n\n

To be continued… Please check daily for more updates..<\/p>\n\n\n\n

<\/p>\n\n\n\n

<\/p>\n\n\n\n

<\/p>\n\n\n\n

<\/p>\n\n\n\n

<\/p>\n","protected":false},"excerpt":{"rendered":"

Basic Format of C++ Program C++ Program to Print Name and Address Output AIPS ACADEMYAbadganj OR Output AIPS ACADEMYAbadganj OR Output AIPS ACADEMYAbadganj OR Output AIPS ACADEMYAbadganj OR Output AIPS ACADEMYAbadganj OR Output AIPS ACADEMYAbadganj C++ Program #Find sum of two numbers. Output Sum=15 OR Output Sum=15 OR Output Sum=15 OR Output Sum=15 C++ Program […]<\/p>\n","protected":false},"author":1,"featured_media":51,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-44","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jac"],"_links":{"self":[{"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/posts\/44","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/comments?post=44"}],"version-history":[{"count":103,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/posts\/44\/revisions"}],"predecessor-version":[{"id":597,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/posts\/44\/revisions\/597"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/media\/51"}],"wp:attachment":[{"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/media?parent=44"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/categories?post=44"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/tags?post=44"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}