Sum of multiples of 8 | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Respostas
+ 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
Sakshi - avatar
+ 3
Can you share your attempt?
22nd Aug 2023, 12:48 PM
Sakshi
Sakshi - 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