Tuesday, March 5, 2024

11. 100+95+90+...+0 :—

 11. 100+95+90+...+0 :—


#include<stdio.h>

int main()

{

    int i,sum;

    sum=0;

    for(i=100;i>=0;i-=5)

    {

        sum=sum+i;

    }

    printf("%d",sum);

    return 0;

}


No comments:

Post a Comment