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

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.

Semoclone ( ; ) is one of the best sensitive symbols in programming. Placing a semicolon ( ; ) after the WHILE or FOR loop is not a syntax error. So it will not be reported by the compiler. However, it is considered to be a logical error as it change

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.

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.

Here we have solved two different equation-

First a^{2} - b^{2} simple rule doing square and subtract between them.

Second a^{3} - b^{3} simple rule doing cubic and subtract between them.

And the third is radius of a sphere taking a fixed value.

First a

Second a

And the third is radius of a sphere taking a fixed value.

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

#include<stdio.h> #include<math.h> #define pf printf int main() { int m,v,solve1,solve2; float r,s; pf("\nEnter the value of r, m, v: "); scanf("%f %d %d",&r,&m,&v); solve1=pow(r,2)-pow(m,2); solve2=pow(r,3)+pow(v,3); s=4/3*3.14*pow(r,3); pf("\nThe value of r^{2}- m^{2}: %f",solve1); pf("\nThe value of r^{3}- v^{3}: %f",solve2); pf("\nThe value of 4/3*3.1416*r^{3}= %d",s); return 0; }

The value of r2 - m2 : -3

The value of r3 - v3 : 28

The value of 4/3*3.1416*r3= 3.140000

The value of r3 - v3 : 28

The value of 4/3*3.1416*r3= 3.140000

- Calculate area of a triangle
- Calculate area of a rectangle
- Calculate area of a rectangle, triangle and circle
- Bonus on employment salary
- Print even or odd number
- Leap year
- Input any key from key-board and display key's feature
- Find large number of two or three given numbers
- Print ASCII value of a character and number
- Print all ASCII value
- Print vowel or consonant
- Find is the given number positive, negative and zero
- Summation, Subtraction, Multiplication and division
- Distance between two point
- Swap two numbers
- Temperature Conversion from Fahrenheit to Celsius to Kelvin and Vice versa

© 2018 - All rights reserved