Problem 02: Write a for loop which will print summation of all the numbers which are divied by 3 and 5 between 30-120.
1
Expert's answer
2021-11-10T00:05:08-0500
Source code
#include<stdio.h>intmain(){
int sum=0;
for(int i=30;i<=120;i++){
if (i%3==0 && i%5==0){
sum+=i;
}
}
printf("\nSummation of all the numbers which are divied by 3 and 5 between 30-120 = %d",sum);
return0;
}
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments