Specifier is a typedef-name and a very sensitive in C programming. Using an incorrect specifier for the data type being read or written will generate a run time error.

Not putting // before the start of single statement comment is a compiler error. Not putting the */ after the termination of block comment is a compiler error.

The iterative statement is one of the most important and interesting statements in the programming world. An iterative statement is used to repeat the execution of a list of statements, depending on the value of an integer expression.

Missing the inclusion of appropriate header file in c program will generate an error. Such a program may compile but the linker will given an error message as it will not be able to find the functions used in the program.

When you are using SWITCH case, it is important to keep in mind that the inclusion of DEFAULT LABEL. This will inform you whether you are executing your program in right or wrong way. So, it is always recommended to use DEFAULT LABEL in the SWITCH st

Solving any mathematical problem there are used some equation. So, to solve our problem we used three equations:

For CIRCLE: Π * radius^{2}

For triangle: 0.5 * height * base

For rectangle: height * width

For CIRCLE: Π * radius

For triangle: 0.5 * height * base

For rectangle: height * width

// AHF C PROGRAM SOLVING //solving here basic type of programming problem

#include<stdio.h> #include<math.h> #define pf printf int main() { double radius,a,b,height,width,res1=0.0,res2=0.0,res3=0.0; //area for circle pf("\nEnter value for circle.............."); pf("\nEnter the radius of the circle: "); scanf("%lf",&radius); res1=3.1416*radius*radius; //area for triangle pf("\nEnter value for triangle.............."); pf("\nEnter the first length: "); scanf("%lf",&a); pf("\nEnter the second length: "); scanf("%lf",&b); res2=.5*a*b; //area for rectangle pf("\nEnter value for rectangle.............."); pf("\nEnter the height: "); scanf("%lf",&height); pf("\nEnter the width: "); scanf("%lf",&width); res3=height*width; //total output pf("\nThe area of the circle is : %lf",res1); pf("\nThe area of the triangle is = %lf",res2); pf("\nThe area of the rectangle is = %lf",res3); return 0; }

Enter value for circle..............

Enter the radius of the circle: 2.5

Enter value for triangle..............

Enter the first length: 2

Enter the second length: 3

Enter value for rectangle..............

Enter the height: 8

Enter the width: 6

The area of the circle is : 19.635000

The area of the triangle is = 3.000000

The area of the rectangle is = 48.000000

Enter the radius of the circle: 2.5

Enter value for triangle..............

Enter the first length: 2

Enter the second length: 3

Enter value for rectangle..............

Enter the height: 8

Enter the width: 6

The area of the circle is : 19.635000

The area of the triangle is = 3.000000

The area of the rectangle is = 48.000000

- Character conversion
- find if triangle or not
- find two same integer constant
- A general instruction for cleaning room by a robot
- Input any number and find color name
- Given four co-ordinates and find the area of a rectangle
- Given number is square able or not
- Enter positive number and convert negative number and vice versa
- Profit or loss on selling goods

© 2018 - All rights reserved