hey guys,

I would like to make a menu like this:

MENU
[A] - Addition of binary digits
- Subtraction of binary digits
my option: A

printf("Input upper addend: 1110");
                              printf("Input lower addend: 111");

sample output:

sum is: 11111


...how can I make it like that?

Member Avatar for iamthwee

There are a number of ways to do that.

Probably an if-else clause would suffice.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.