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


 

 

4.      Write a program (without using an array) that accepts three numbers from the user and prints "increasing" if the numbers are in increasing order, "decreasing" if the numbers are in decreasing order, and "Neither increasing or decreasing order" otherwise.

 

Example: Input first number: 1524

Input second number: 2345

Input third number: 3321

 

Expected Output :

 

Increasing order

 

5.      Write a java program that inputs an integer and outputs if the number is a Palindrome.

 






2. Write a program in Java to display a diamond pattern of asterisks.

Expected Output :


*

***

*****

*******

*********

***********

*************

***********

*********

*******

*****

***

*



3. Write a Java program that reads a positive integer and counts the number of digits the number has.

e.g. Input is 14367, Output is 5.





1.      Write a program in Java to display a right-angled triangle pattern with numbers, as shown below.

Expected Output :

1                                                                               

12                                                                              

123                                                                             

1234                                                                            

12345                                                                           

123456                                                                          

1234567                                                                         

12345678                                                                        

123456789                                                                       

12345678910

 

   

 




Design and implement a GUI program to compare two strings and display the larger one


1. Number of rows


Description

This is the number of rows of the multidimensional array.

2. Number of columns


Description

This is the number of columns of the multidimensional array.

3. Elements of the multidimensional array

Output

The first line will contain a message prompt to input the number of rows.

The second line will contain a message prompt to input the number of columns.

The succeeding lines will contain the elements of the input multidimensional array.

Finally, the last line will contain the position (row, col) of the first element of the consecutive increasing number.

Enter·number·of·rows:·3
Enter·number·of·columns:·4
1·1·2·3
5·8·2·1
3·2·0·5
Position:·0,·1

Using the do…while() loop, continuously scan for random integers, but add up only all the positive integers and store the total in one variable.


The loop shall only be terminated when the inputted integer is zero. Afterwards, print out the total of all inputted positive integers.

Continuously ask for floating point values (decimal numbers) using the do…while() loop, sum them all up, and store the total into one variable.



The loop shall only terminate for the following reasons:



A negative decimal number is inputted (but still included in the total sum)



The total sum reaches 100.0 or more

Using a do…while() loop, continuously scan for characters (one per line) and print it out afterwards.



The loop shall terminate due to either of the following reasons:



The inputted character is a vowel



The number of inputted characters has already reached 5.

Using a do...while() loop, continuously scan for random integers that will be inputted by the user and print out its square, separated in each line.


Once the inputted value is 0, it will still print out its square value but should then terminate the loop afterwards. Use this concept in making your loop condition.

Each customer will type in a code representing the structure of their order, and your program will display (to standard output) a summary of the order components along with the total cost. An order code is exactly nine characters long, representing four optional toppings. The order code positions, from left to right, represent the following elements:




Four optional Items:



1. 'Y' means the customer wants corn (no additional charge), and 'N' means that the customer does not want corn.



2. 'Y' means that the customer wants guacamole ($0.50 extra), and 'N' means that the



customer does not want guacamole.



3.. 'Y' means that the customer wants sour cream (no additional charge), and 'N' means that the customer does not want sour cream.



4.. 'Y' means that the customer wants cheese ($0.50 extra), and 'N' means that the customer


does not want cheese.


LATEST TUTORIALS
APPROVED BY CLIENTS