0% found this document useful (0 votes)
39 views2 pages

Day 1 Assignment

The document discusses a Java fundamentals assignment that involves writing simple Java programs using conditional and looping statements, arrays, strings, and command line arguments. It provides 5 problems to solve including writing a program to list even numbers, displaying sum and average of integers from user input, performing math operations from command line arguments, checking if a number is in an array and displaying BINGO, and reversing and alphabetizing an array of words.

Uploaded by

CHANDAN SINGH
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views2 pages

Day 1 Assignment

The document discusses a Java fundamentals assignment that involves writing simple Java programs using conditional and looping statements, arrays, strings, and command line arguments. It provides 5 problems to solve including writing a program to list even numbers, displaying sum and average of integers from user input, performing math operations from command line arguments, checking if a number is in an array and displaying BINGO, and reversing and alphabetizing an array of words.

Uploaded by

CHANDAN SINGH
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Java

Assignment - Day 1
Concept: Java Fundamentals

Objective: At the end of the assignment, participants will be able to:

 Write simple java programs


 Use conditional and looping statements
 Use arrays and strings
 Use command line arguments

Guidelines:

 Follow the naming conventions


 Give appropriate comments

Problems:

1. Write a program to list all even numbers less than or equal to the number n.
The value of n is given through command line as input to the program.

2. Create an array of integers by reading values from the user. Display the sum
and average of the integers. Also, display the number of values less than the
average.

3. Write a program that accepts two numbers and a operator like (+,-,*, /) as
command line arguments and perform the appropriate operation indicated by
the operator.

4. Write a program that accepts a number in the range 1 to 50 from the


Command Line. It then compares the number against a single dimension

Copyright © 2015, Tech Mahindra. All rights reserved. 1


array of five integer elements ranging in value from 1 to 50. The program
displays the message BINGO once the given input is found in the array.

5. A set of 5 words is given. Write a program to reverse each word and arrange
the resulting words in alphabetical order.

Version History:
Version No Author Date Created Reviewed by
1.0 24/06/2016

Copyright © 2015, Tech Mahindra. All rights reserved. 2

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy