Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What is wrong with my java code? How do I fix it? and Will it run the way I want it too? public class Exercise

What is wrong with my java code? How do I fix it? and Will it run the way I want it too?

public class Exercise
{
public static void main(String[] args)
{
int x;
int y;
int product;
int landSpeed;
float decimalValue;
float weight;
double difference;
double result;
char letter;
   
x=34;
y=45;
product=(x*y);
landSpeed=(x+y);
decimalValue=99.3f;
weight=33.21f;
difference=(decimalValue-weight);
result=(product/difference);
char letter='X';

System.out.println("product="+product);
System.out.println("sum="+landSpeed);
System.out.println("diff="+difference);
System.out.println("result="+result);
System.out.println("The value of letter is " + letter);
System.out.println("<<--- --- --- \\\ -o- /// --- --- --->>");
System.out.println("#######    #                  #          # ");
System.out.println("            #      #                  #           # ");
System.out.println("         #        #                   #            # ");
System.out.println("      #           #                     #######");
System.out.println("   #              #                  #            #");
System.out.println("#                 #                  #            #");
System.out.println("#######   #######   #            #");

}
}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Cambridge Checkpoint Lower Secondary Mathematics Student's Book 7

Authors: Frankie Pimentel, Ric Pimentel, Terry Wall

3rd Edition

978-1398301948, 1398301949

More Books

Students also viewed these Algorithms questions

Question

Explain the steps involved in training programmes.

Answered: 1 week ago

Question

What are the need and importance of training ?

Answered: 1 week ago

Question

=+c. Calculate and interpret the coefficient of determination.

Answered: 1 week ago

Question

=+c. Construct a plot of the residuals. What does it suggest?

Answered: 1 week ago