Hey guys can u pls help me out last 1 i promise

hey guys
thanks for your help so far,
just need sum with this 1

Write a C++ program with a loop structure that reads in 5 integers one by one, calculate the sum of the values that are multiples of 3 and display the final result.

thanks
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// pseudocode = yes
// Like perl people say, there's more than 1 way to do it
// and I used multiple loops

int myints[4],mysum
short i

for ( i=0,4,i++)
cin >> myints[i]

mysum = 0
for ( i=0,4,i++)
mysum = mysum + myints[i]
cout << mysum

for ( i=0,4,i++)
if (myints[i] % 3 == 0) cout << i "," myints[i]

Topic archived. No new replies allowed.