Write a program to calculate the sum of the numbers occurring in the multiplication table of 8.(Consider 8x1 to 8x10)

 #include <stdio.h>


int main() {


    int sum , i , n ;

    printf(" sum till where : ");

    scanf("%d",&n);

    sum=0;

    i=0;

    do{

        sum = sum + i;

        i=i+8;

    }

     while(i<=8*n);

    printf("%d",sum);


    


    return 0;


    


}    

Comments

Popular posts from this blog

Sum of Even Numbers till N

Find the Runner-Up Score!

Print All Substrings