Saturday, July 4, 2015

// // 1 comment

Solution To Introduction To Java Programming Exercise 1.6

The program below is the answer to Liang's Introduction To Java Programming (9th Edition) Chapter 1 Exercise 1.6.

Question: Write a program that displays the result of 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9.

/**
 *
 * @Author: Aghatise Osazuwa
 * Website: www.cscprogrammingtutorials.com
 *
 * Exercise 1.6 - Summation Of A Series
 *
 */ 

public class Ex01_06 {

 public static void main(String[] args) {

  System.out.println("1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 = "
    + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9));

 }
}


Click here to see other solutions to Introduction to Java Programming.

1 comment:

  1. Thank you again for all the knowledge you distribute, Good post. I was very interested in the article, it's quite inspiring I should admit. I like visiting your site since I always come across interesting articles like this one. Great Job, I greatly appreciate that. Do Keep sharing! Regards.

    ReplyDelete


DISCLAIMER: Opinions expressed in comments are those of the comment writers alone and does not reflect or represent the views of the post author. We reserve the right to delete any post deemed inappropriate or offensive and/or spammy. Please do not use abusive words/hate speech.

I Appreciate your valuable Feedback. So, Please DO NOT SPAM - Spam comments will be deleted immediately.

Don't use brand name in name field and you're not allowed to use links in comments unless it's necessary. Such comments will be removed immediately.

Thanks.