Page 656 - Computer science 868 Class 12
P. 656
22
12
the binary numbers are:10110 1100
enter the choice: 1. addition 2.substraction 3.multiplication 4.division
1
the sum is:100010
Enter 2 decimal numbers:
44
22
the binary numbers are:101100 10110
enter the choice: 1. addition 2.substraction 3.multiplication 4.division
2
the difference is:10110
Enter 2 decimal numbers:
55
2
the binary numbers are:110111 10
enter the choice: 1. addition 2.substraction 3.multiplication 4.division
3
the product is:1101110
Enter 2 decimal numbers:
55
44
the binary numbers are:110111 101100
enter the choice: 1. addition 2.substraction 3.multiplication 4.division
4
1011
the quotient:1
the remainder:1011
Project 2 Write a program to convert an infix expression to postfix using the concept of stack.
1 import java.util.*;
2 class Stack
3 {
654654 Touchpad Computer Science-XII

