0

Sum of multiples of 8

8×1 to 8×10 using c language

22nd Aug 2023, 12:16 PM
Priyansh Bansal
Priyansh Bansal - avatar
4 Answers
+ 4
Priyansh Bansal Little bit changes, here is the corrected form: https://code.sololearn.com/cT3qTvJD2Uu5/?ref=app
22nd Aug 2023, 1:01 PM
Sakshi [Offline 🙃]
Sakshi [Offline 🙃] - avatar
+ 3
Can you share your attempt?
22nd Aug 2023, 12:48 PM
Sakshi [Offline 🙃]
Sakshi [Offline 🙃] - avatar
+ 1
int main() { int i=0,sum=0; for(i;i<=80;i+=8){ sum+=i; } printf("The sum of mutiples of 8 is %d",sum); return 0; }
22nd Aug 2023, 12:56 PM
Priyansh Bansal
Priyansh Bansal - avatar
+ 1
Ok thanks
22nd Aug 2023, 1:05 PM
Priyansh Bansal
Priyansh Bansal - avatar