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.

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

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.

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.

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 meaning of this question is that,

First number will add with immediate next number and print sum ( this will happend once ).

Second sum will add with immediate next number ( which taken last ).

first-number + next-number = sum(will_print);

sum + next-number = sum(will_print);

Here "next-number" is the increment statement.

add increment number with last total sum.

1 + 2 = 3

3 + 3 = 6

6 + 4 = 10

10 + 5 = 15

To be continued as long as your given number........

First number will add with immediate next number and print sum ( this will happend once ).

Second sum will add with immediate next number ( which taken last ).

first-number + next-number = sum(will_print);

sum + next-number = sum(will_print);

Here "next-number" is the increment statement.

add increment number with last total sum.

1 + 2 = 3

3 + 3 = 6

6 + 4 = 10

10 + 5 = 15

To be continued as long as your given number........

// AHF C PROGRAM SOLVING //solving here ITERATIVES STATEMENTS type of programming problem

#include<stdio.h> #include<math.h> #define pf printf int main() { int n,j,sum=0; //taking the number to continue loop pf("Enter the first number: "); scanf("%d",&n); for(j=1;j<=n;j++) { //number is added and assigning in sum variable sum+=j; //printing all the value of sum variable pf("%d ",sum); } return 0; }

Enter any number: 10

1 3 6 10 15 21 28 36 45 55

1 3 6 10 15 21 28 36 45 55

- Print whether given number is prime or composite
- Prime number in a range
- Leap year in a range
- Print a multiplication table of Nth number
- Print even and odd number in a range
- Calculate power i.e., calculate x
^{n} - Calculate Summation of this series 1 + 1/2 + 1/3 + ...... + 1/x
- 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} - Print all ASCII value
- Print vowel or consonant
- Find is the given number positive, negative and zero

© 2018 - All rights reserved