example output

The price per kilo of rice is 30.

Enter The kilos of Rice: 30

The price of rice is:900

30X30=900

It is a simple multiplication. If it is for finals, then how is it possible that you don't know how to declare 2 int variables, multiply them and assign the result to a third int variable and then print it?
Or even how to read from the input.

Search this forum for examples no how to read input from the keyboard by using the Scanner class.

And I doubt that this 30X30 is a special project.

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.