Pseudocode to C

A tool that allows users to easily convert pseudocode to C programming language.

Enter Pseudocode Here:

Generated C Code:

Documentation

Initializing variables

# keywords
initialize and declare

# with value (autodetect datatype)
initialize x to 100

# no value
initialize x as (int/float/char)
initialize float x

Assigning variables

# keywords
set

# Examples
set x to 10
set x to 10 plus 1
set x to y (plus/minus/multiply/divide) 10

Arithmetic Operations

# keywords
add, subtract, multiply, divide

# Examples
add 10 to x
subtract 10 to x
multiply x by 10
divide x by 2

If-else Statements

# keywords
if, elif, and else

# conditional statemetns
greater than, less than, equal, not equal, or, and, greater than or equal, less than or equal

# Examples
if x is greater than y
# code here
elif x is less than y
# code here
else
# code here
endif

For loop

# keywords
for and loop

# Examples
for i equals 1 to 100
# code here
enfor

loop x from 1 to 100
# code here
endloop

Increment & Decrement

# keywords
increment and decrement

# Examples
increment x
decrement x

Print Statement

# keywords
print, display, show, log

# Examples
print x (if x is not initialized, it will automatically print as text)
print 'hello world!'
print 'x: ' x

While loop

# keywords
while

# Examples
while x is less than 10
# code here
endwhile

Comments

# keywords
comment, //, #

# Examples
comment this is a comment
# this is a comment
// this is a comment