0

Can you help me to complete the code for this?
The result should be in words.
And wether 'A' or 'a' will be ok when you input the operator.

this was the given:

Enter First Number:8
Enter Second Number:9
M=* || m=* D=/ || d=/
A=+ || a=+ S=- || s=-
Enter Operator:m
Result:seventy-two // the result should depend on what operator you choose.

please check if there is more code to change and there is a lot missing code..please complete my code if you know...thank you so much!!!

import java.io.*;
public class Casestudy {
public static void main(String[] args) throws IOException {

BufferedReader stdin=new BufferedReader(new InputStreamReader(System.in));


System.out.println("Case Study Number 1");

System.out.print("Enter number 1:");
int num1=Integer.parseInt(stdin.readLine());

System.out.print("Enter number 2:");
int num2=Integer.parseInt(stdin.readLine());

System.out.println("A=+");
System.out.println("S=-");
System.out.println("M=*");
System.out.println("D=/");

System.out.print("Enter Operator:");
int operator=Integer.parseInt(stdin.readLine());

}
}

3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by Xufyan
0

I already answered your question in your other thread here.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.