Write a java program that reads an integer n from the key board and compute the value of 2^n and output it to the screen
![]() |
Write a java program that reads an integer n from the key board and compute the value of 2^n and output it to the screen
Thank you for asking our help with your homework assignment. However, there are some rules we have for doing so.
Do not simply retype or paste a question from your book or study material
We won't do your homework questions for you. You were given the assignment for you to learn.
If you come up with your own answer or process and post it for us to critique that is acceptable. If you have some SPECIFIC questions that you couldn't find or didn't understand, we may help with that.
But this is your assignment, so show us you have at least attempted to complete it on your own.
Thank you.
public class interger
public static void main ( string [] args{
int value n=1
System.outprintin(" enter the value of the integer")
then I can't seem to finish it :(
I don't know Java, but you need to provide a way to input the value and assign it to a variable. From there it should be simple to compute the value of 2^n and output it.
All times are GMT -7. The time now is 11:38 PM. |