MULTIPLES OF 3 OR 5

PHOTO EMBED

Sun Oct 29 2023 09:01:08 GMT+0000 (Coordinated Universal Time)

Saved by @usman_hamed

// Online C compiler to run C program online
#include <stdio.h>

int main() {
    int mul=0;
    int sum=0;
    while(mul<=1000){
        if(mul%3==0 || mul%5==0)
        sum+=mul;
        mul++;
    }
    printf("sum is %d",sum);
}
content_copyCOPY

SUM OF MULTIPLES OF 3 OR 5 BELOW 1000