The first Assignment for I601
The Calculator Assignment
The second Assignment for I601
The Sesame Street Simulator
The third Assignment for I601
The Array Assignment
The in-class example from week 7. You need it for the next assignment.
Example -- strings and pointers
The fourth Assignment for I601
find and replace
The in-class example from week 8. You need it for the next assignment.
Example -- read write strings
the data file for the above
This program adds two numbers. The numbers are built in,
you need to change the program to change the numbers.
This modification lets the user enter the numbers to be added,
a more realistic choice.
The scanf function is used to get input from the keyboard.
In this version of the program I have change things just a bit.
I have changed the data type to float.
This means that you can add numbers with decimal points.
The printf has been changed so that the addition
and the printing are done at the same time
This is the way a C programmer would do it
In fact, a programmer probably wouldn't have a variable for the sum.
The printf would look like:
printf("The sum is d%",num1 + num2);
Notice that I had to change the %d in printf to %f
to match the changed types of num1 and num2
This program is even more C programmer like.
It breaks the program into functions (main and summit)
The printf now displays all three numbers.
This page is at: http://testbed.cis.drexel.edu/cindex1.html