Ask Experts Questions for FREE Help !
Ask
    other5's Avatar
    other5 Posts: 2, Reputation: 1
    New Member
     
    #1

    Jan 22, 2012, 03:08 PM
    Write a java program that reads an integer n from the key board and compute the value
    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
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #2

    Jan 22, 2012, 03:12 PM
    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.
    other5's Avatar
    other5 Posts: 2, Reputation: 1
    New Member
     
    #3

    Jan 22, 2012, 03:20 PM
    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 :(
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #4

    Jan 22, 2012, 03:23 PM
    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.

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Write an interactive C program that reads a series of 12 temperatures from a file c [ 1 Answers ]

Write an interactive C program that reads a series of 12 temperatures from a file called "12temp.dat". It should display to the user each temperature and the difference between the current temperature and the one preceding it via cout. The difference is not output for the first temperature that...

How to write a java program that will open three programs at the same time anyy thre [ 0 Answers ]

HI How to write a java program that will open three programs at the same time Anyy three rogrames like outlock ,excel etc.. I really need the answer Sara ,thank you

Write an interactive C++ program that reads a series of 12 temperatures from a file c [ 1 Answers ]

Write an interactive C++ program that reads a series of 12 temperatures from a file called "12temp.dat". It should display to the user each temperature and the difference between the current temperature and the one preceding it via cout. The difference is not output for the first temperature that...


View more questions Search