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

    Oct 12, 2011, 08:34 PM
    Computer Programming
    Predict the output of the following code segments? [5 points each, total 10 pts]

    1) System.out.print ("I am the incredible");
    System.out.print ("computing\nmachine");
    System.out.print ("\nand I will \namaze\n");
    System.out.println ("you.");
    System.out.println ("This line might/n be a trick");

    2) int x = 23, why = 2, sum, diff, prod, quot, mod;
    Sum = x y;
    Diff = x - y;
    Prod = x * y;
    Quot = x / y;
    Mod = x % y;
    System.out.println (sum "\n" diff "\n" prod "\n" quot "\n" mod);
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #2

    Oct 13, 2011, 03:41 AM
    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.

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!

Computer programming C++. Can someone help me out [ 1 Answers ]

Write a C program that initializes 5x3 array in which the first element of each row contains a number, the second element contains its square and third element contains its cube. Prompt the user to enter a number within 1 to 5 and prints its square and cube. Can someone help me write the...

Computer programming in factorial.Need help [ 1 Answers ]

Question is in attachment because I can't post the image here.The question is in the attachment.Currently, I don't know how to start because its very difficult.I even studied the textbook and references but I'm still unable to solve it.Can someone help me this out by giving the guide to start.I...

Computer Science & Programming Differences [ 3 Answers ]

What are the differences? I want to work with Java, C++, Perl, and other stuff but I can't find the approprate stuff. Maybe because I'm 15. But could one of you all help me. Thanks.

Computer programming [ 2 Answers ]

How do yeah teach a computer the meaning of nothing?


View more questions Search