P
Paul
I want to make a simple calculator program but dont know where to get
started. This is not GUI but a simple terminal program.
It would get input like this
Enter number:
5
+
10
=
the result is 15.
Iw would keep adding or subtracting... until the user enters '='
I want to loop this so that if the person would enter 'q' it would
quit.
Iam thinking maybe of a while loop in the beginning like this
while (scanf("%d", &num) == 1)
but after this I dont know where to go.
Dont post the whole code just need a little help getting started.
BTW: Iam still learning C from a book called C Primer Plus and I just
finished a chapter about if else switch() break. So I dont know much
but I think its enough for this simple project.
started. This is not GUI but a simple terminal program.
It would get input like this
Enter number:
5
+
10
=
the result is 15.
Iw would keep adding or subtracting... until the user enters '='
I want to loop this so that if the person would enter 'q' it would
quit.
Iam thinking maybe of a while loop in the beginning like this
while (scanf("%d", &num) == 1)
but after this I dont know where to go.
Dont post the whole code just need a little help getting started.
BTW: Iam still learning C from a book called C Primer Plus and I just
finished a chapter about if else switch() break. So I dont know much
but I think its enough for this simple project.