Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Place Values (JAVA)

by CodeChum Admin

Manipulating values from a series of numbers is fun, but let's try exploring the use of loops a little more.


How about printing out each digit of a number starting from its rightmost digit, going to its leftmost digit?


Instructions:

  1. Input a non-zero positive integer.
  2. Using while loop, print out each digit of the inputted integer in separate lines, starting from its rightmost digit until the leftmost digit of the number.
  3. Tip #1: Use % 10 to get the rightmost digit. For example, if you do 412 % 10, then the result would be the rightmost digit, which is 2.
  4. Tip #2: On the other hand, use / 10 to remove the rightmost digit. For example, if you do 412 / 10, then the result would be 41.
  5. Tip #3: You'd have to repeat Tip #1 and Tip #2 inside the while() loop for this problem while the inputted integer is not yet 0.

Input

A line containing an integer.

214

Output

Multiple lines containing an integer.

4
1
2

Against All "Odds"

Instructions:

  1. Input a positive integer. This will serve as the starting point of the loop.
  2. Using a while() loop, print out all the odd numbers starting from the inputted integer, until 0. The outputted numbers must all be separated by line.
  3. Also remember that since the loop goes to descending order, a decrement variable shall be created and decreased per iteration for the loop to terminate when it reaches 0.

Instructions

  1. Scan an integer that will accept an integer greater than 0 and store it in a variable.
  2. Using a while() loop, print out all the odd numbers starting from the inputted integer, until 0. The outputted numbers must all be separated by line, just like that of the sample output.
  3. Also remember that since the loop goes to descending order, a decrement variable shall be created and decreased per iteration for the loop to terminate when it reaches 0.

Input

A line containing an integer.

10

Output

Multiple lines containing an integer.

9
7
5
3
1






Colleges in India are following the CGPA system. Continuous hard work is needed to get to a good CGPA at the end of every of semester. Placements depends a lot on CGPA for good job packages. Suppose XYZ company is coming to your college and you are one among the coordinators to find the eligible students. That company need at least 5 brilliant students in an ascending order. Write a program using c++ programming language that consist of a class having one float array data member which stores the random CGPA of 20 students and containing one member function to sort students in ascending order of their CGPA.


Explain the concept of multipath inheritance with the help of suitable programming example.


. Explain Discuss in detail about the problem of ambiguity in multiple inheritance. How the ambiguity problem is resolved in multiple inheritance by taking suitable example.


The manager of the company has informed his assistant to enter the age of all the workers working in production department. Among all he has to find the employee with maximum age employee. Help the manager witn c++ program based on the concept of object oriented programming by creating a class employee having members empid, empname, edept,eage and display the name ,dept. and salary employee whose salary is minimum. Store the date of at least 7 employees. Make the data members of class only public. (6) Constraints Employee salary should be greater than or equal to 10000 if constraints are not matched then display "Wrong Salary Input’ 


. There are 15 students in the class. Students had their mid term result in INT105 and teacher from CSE domain wants to find the average marks of the class for course code INT105 and display it. Write a program using C++ programming language that consists of an class having name Student containing one integer array data member which stores the total marks of 15 students and float data member that calculate the stores average marks to 10 students. Use constructor to initialize data members and member functions to calculate and display average marks.


Employee Record is composed of the following:

  • record_no
  • first_name
  • last_name
  • address
  • city
  • county
  • state
  • bdate
  • zip
  • phone1
  • phone2
  • email
  • web


In the given string, Each employee data is separated by comma (,). Each record is separated by semicolon (;).


A - The program must be able to display employee record based on the given key.

B - The program must be able to display the last name, first name and age of an

employee based on the given key. (assume that the current date is April 22, 2022)

C - The program must be able to display the number of employee in a given county.

D - The program must be able to count no. of employee based on a given email provider site.




1. data

Output


Enter·your·choice·(A/B/C/D/X-exit):·A
Enter·Record·No.:·10

First·Name:·Kris
Last·name:·Marrier
Address:·228·Runamuck·Pl·#2808
City:·Baltimore
County:·Baltimore·City
State:·MD
Birth·Date:·12/19/1983
zip:·21224
phone1:·410-655-8723
phone2:·410-804-4694
Email:·kris@gmail.com
web:·http://www.kingchristopheraesq.com

Enter·your·choice·(A/B/C/D/E/X-exit):·X
Bye!






Create enum for departments in an university – FINANCE, NETWORKS, EXAMINATION, are all departments of a university. Use the department enum in employee class. Traversed the department enum and prints the ordinal values. Enhanced enum with a new private instance variable deptCode holding the department code, a getter method for deptCode named getDeptCode(), and a constructor which accepts the department code at the time of enum creation


Write a Java program to print "hello" on the screen and write your name on the separate line?

LATEST TUTORIALS
APPROVED BY CLIENTS