printf()
and scanf()
to prompt the user for the total budget, and the proportion of the
amount to use for Antwerp and Bloemfontein.
1.3006
),
7.223
),
10.9705
).
.33
for 33%.
Enter total budget: 1000
Enter Antwerp proportion: .33
Enter Bloemfontein proportion: .33
Total budget is: 1000
Antwerp budget is: 253.73 euros
Bloemfontein budget is: 2383.59 rands
Cancun budget is: 3729.97 pesos
main.c
here is a
Makefile
that you can use to try to compile the project:
CC = gcc
.c.o:
$(CC) -c -o $@ $<
all: main
main: main.o
$(CC) -o $@ $@.o
main.o: main.c
clean:
rm -f *.o
rm -rf main
Note that each line underneath the targets is indented by a tab, not just
spaces, this is important!
tar.gz
archive of your asg##/ directory, including:
README
file containing
Makefile
.h
headers and .c
source)
make clean
before tar
)
handin
notes