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.

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

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.

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.

// AHF C PROGRAM SOLVING //The problem are solving here using FUNCTION

#include<stdio.h> #include<math.h> #define pf printf //function declaration float dis(float v, float a, float t); float vel(float v, float a, float t); void main() { float x,y,z; float distance,velocity; pf("\nEnter the velocity: "); scanf("%f",&x); pf("\nEnter the acceleration: "); scanf("%f",&y); pf("\nEnter the time: "); scanf("%f",&z); //call first function distance=dis(x,y,z); //call second function velocity=vel(x,y,z); pf("\nThe distance is: %.2f",distance); pf("\nThe velocity is: %.2f",velocity); return 0; } //definition of first function float dis(float v, float a, float t) //function header //body of the first function { float m; m=v+(a*t); //finding velocity return m; } //definition of the second function float vel(float v, float a, float t) //function header //body of the second function { float n; n=v*t+(.5*a*t*t); //finding distance return n; }

Enter the velocity: 2 Enter the acceleration: 3.2 Enter the time: 3.2 The distance is: 12.24 The velocity is: 22.78

- String_ convert from lowercase to UPPERCASE of given string
- String_ Capitalize Each Word in a string
- String_ count total line in a string
- String_ word by word reveres of a string
- Calculate Summation of this series 1 + 1/5 + 1/9 + 1/13 + ...... + 1/x
- Calculate Summation of this series 1 + 2
^{2}+ 3^{3}+ ...... + x^{x} - Calculate Summation of this series 1 + 2
^{2}+ 3^{2}+ ...... + x^{2} - Calculate Summation of this series 1/2 + 2/3 + ...... + x/(x+1)
- Calculate Summation of this series 1 + 1/2
^{2}+ 1/3^{2}+ ...... + 1/x^{2} - Enter a number and print summation each digits
- Enter a number and Print each digits as even or odd number
- Function_ find leap year
- Function_ find leap year in range
- Function_ find maximum and minimum of an integer
- Function_ find prime number
- Function_ find prime number in range

© 2018 - All rights reserved