Skip to content

shahnaz-43/function_array

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Assignment on Function and Array

  1. Take input from a user and check if the number exists in the array let the array is [1,3,5,7,2,4,6,8] Input: 7 Output: Found in the position 3 Input: 9 Output: Found no element

  2. Input an amount from the user and find out the number of notes from input amount in given array [1000,500,100,50,20,10,5,2,1] Input: 1256 Output: 1000 1 100 2 50 1 2 3

  3. Suppose, in a company , here are some employee salaries in an array [35000, 25000, 28000, 32500, 44000, 32800] Find out the 3rd highest salary

  4. Create your todays bazar list/pocket expenditure which includes the item name and price. Then create a function named searchItem(String item) which will be used to search any item from your HashMap and return the price. If found no item, then print message as "No item found" and another function named totalSum() which will return total price of items.

  5. Take 5 numbers from users in an array. Then find out the average number, how many even and how many odd numbers using these functions: average(), countEvenNumbers(), countOddNumbers()

  6. Suppose a software system excepts valid credentials from user to logged in to the system. if the user inputs wrong password for 3 times, system will say that "Your user has been temporary locked". Let the username: admin, password: adm1n

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages