Learn How to Program in C

by
Dr. Kristin Switala

Introduction

Directives

Variables

Conditionals

Loops

Arrays

Pointers

Strings

Functions

Structures


Site Map

Projects: Conditionals (a)

Instructions: Create a C program that runs successfully for each project below.


Project 1

Ask the viewer this question: Have you ever seen a volcano erupt (y or n)?

Use a conditional to give these answers:

  • if y: You have witnessed something awesome.
  • if no: I hope you safely see one some day.

Project 2

Ask the viewer this question: What is your shoe size?

Use a nested conditional to give these answers:

  • if > 10: You have big feet. and if > 14: You have gigantic feet!
  • else: You have average to small feet.
Copyright
© 2001
Kristin Switala
Hosted by www.Geocities.ws

1