Title: Computer Programming: The basics of the C language
1Computer ProgrammingThe basics of the C
language
- Brian Keinath
- Prepared for eleventh grade students
2Computer Programming is
- Writing functions, in a specific code or computer
language, for the computer to carry out certain
tasks or procedures. - Learn more
3C is...
- One of many programming languages
- Runs on the Unix Operating System
- Can be used to create computer programs for just
about any purpose
4A Basic C Program
include ltiostreamgt using namespace
std main() cout ltlt I am a basic C Program
ltlt endl
5Another Basic C Program
include ltiostreamgt using namespace
std main() int num1 5, num2 4, sum sum
num1 num2 cout ltlt The sum of ltlt num1 ltlt
and ltlt num2 ltlt is ltlt sum ltlt endl
6What you need to do now
- Grad a piece of paper and a pencil or you can
click the button to print out an activity sheet. - Circle YES if the following slides are examples
of computer programs or NO if they are not.
7Slide 1Is this a C Program?
include ltiostreamgt using namespace
std main() cout ltlt I am a C Program? ltlt
endl
8Slide 2Is this a C Program?
include ltiostreamgt using namespace
std main() cout ltlt I am a C Program? ltlt endl
9Slide 3Is this a C Program?
include ltiostreamgt using namespace
std main() int age 10 cout ltlt I am ltlt
age ltlt years old ltlt endl
10Slide 4Is this a C Program?
include ltiostreamgt main() int num1 10, num2
12, sum sum num1 num2 cout ltlt The sum of
ltlt num1 ltlt and ltlt num2 ltlt is ltlt sum ltlt
endl
11How well did you do?
- It is now time to check your answers!
12Answers
13References
- Adams,Joel. C An Introduction to Computing.
2003. - Online Tutorial http//www.cplusplus.com/doc/tutor
ial/ - Online Reference
- www.cppreference.com
- Images
- www.gateway.com www.gifanimations.com
14Answers