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.

The test expression done on exact statement. The good habit of using test expression on exact or fulfill statement. So do not use floating point numbers for checking for equality in the test 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

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.

If we divide a number and if there no reminder then called it even number and there exist reminder we called it odd number.

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

#include<stdio.h> #include<math.h> #define pf printf int main() { int a; pf("Enter the number: "); scanf("%d",&a); //checking if there is any reminder or not if(a%2==0) { pf("\n The number is an EVEN number."); } else pf("\nThe number is an ODD number."); return 0; }

Enter the number: 7

The number is an ODD number.

Enter the number: 8

The number is an EVEN number.

The number is an ODD number.

Enter the number: 8

The number is an EVEN number.

- Enter positive number and convert negative number and vice versa
- Profit or loss on selling goods
- Calculate area and circumference of circle
- In a integer, count digits,sum of digits,reverse the integer and print even and odd digits of the integer
- Find the basic salary, facilities on total salary except tax
- Calculate roots of quadratic equation
- Solve simple formula solution
- Calculate result CGPA in one subject

© 2018 - All rights reserved