x Turn on thread page Beta
 You are Here: Home >< GCSEs

# Computing science pseudocode watch

1. Help me , thank u
Using a FOR-NEXT structure write a pseudocode program to calculate the sum of the first five odd numbers.
2. (Original post by hahahuoyan)
Help me , thank u
Using a FOR-NEXT structure write a pseudocode program to calculate the sum of the first five odd numbers.
The odd numbers go every other number and so your count is in 2s.
You need an initial total set to zero.

This would do

total = 0;
FOR i = 1 to 5
total := total + i*2-1;
NEXT i
print total;

You could also use For i = 1 TO 9 STEP 2 where i goes from 1 to 9 STEP 2 so i would get to be 1, 3, 5, 7, 9.

TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

This forum is supported by:
Updated: March 24, 2016
Today on TSR

### Loughborough better than Cambridge

Loughborough at number one

Poll
Useful resources

## Study tools

### Essay expert

Learn to write like a pro with our ultimate essay guide.

See where you can apply with our uni match tool

### Make study resources

Create all the resources you need to get the grades.

### Create your own Study Plan

Organise all your homework and exams so you never miss another deadline.

### Resources by subject

From flashcards to mind maps; there's everything you need for all of your GCSE subjects.

### Find past papers

100s of GCSE past papers for all your subjects at your fingertips.