Programming & Computer Science Answers

C++ 9913
Python 5288
Java | JSP | JSF 3611
C 1680
C# 1362
Computer Networks 989
Algorithms 652
Databases | SQL | Oracle | MS Access 641
HTML/JavaScript Web Application 588
Other 537
Visual Basic 358
Assembler 209
Software Engineering 202
AJAX | JavaScript | HTML | PHP 166
MatLAB 150
MatLAB | Mathematica | MathCAD | Maple 124
Action Script | Flash | Flex | ColdFusion 112
UNIX/Linux Programming 89
Web Development 73
Excel 36
ASP | ASP.NET 23
Delphi | Pascal 21
Perl 16
Prolog 9
Functional Programming 9
MathCAD 5
Wolfram Mathematica 4
WPF 4
Ruby | Ruby on Rails 3
NodeJS Web Application 2

Questions answered by Experts: 26 876

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

Largest Digit

This one is a bit tricky. You're going to have to isolate each digit of the integer to determine which one is the largest, so good luck!


Instructions:

  1. Input a 3-digit integer.
  2. Print the largest digit in the integer.
  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 three times for this problem because the input is a 3-digit integer.

Instructions

  1. Input one 3-digit integer.
  2. Print the largest digit in the integer. (Hint: use % 10 to get the rightmost digit and / 10 to remove it)

Input

A line containing a three-digit integer.

173

Output

A line containing a single-digit integer

7


"The code should use If-Else-Elseif statement"


Write an application for a lawn-mowing service. The lawn-mowing season lasts 20 weeks. The weekly fee for mowing a lot under 4,000 square feet is R25. The fee for a lot that is 4,000 square feet or more, but under 6,000 square feet, is R35 per week. The fee for a lot that is 6,000 square feet or over is R50 per week. Prompt the user for the length and width of a lawn USING JOPTIONPANE, and then display the weekly mowing fee USING JOPTIONPANE , as well as the 20-week seasonal fee. Save the file as Lawn.java.

Marks allocation 

1. The use of class and object - 10

2. The use of JOption for input -10

3. The use of JOption for output-10

4. correct out -10

 


Using MS-Excel, make a table for n=1 to 10 and generate a graph to show how the following functions grow. Using the table and the graph, determine which function grows faster.

  1. n log n
  2. n2
  3. log(n+1)
  4. 15 log n

e.    a2n  



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

* Programming Assigment 01 *

* CEN114 C and C++ Programming *

* Author: ???*

*Due date: tuesday, march 22 *

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


Write a simple c++ program that will display the area and circumference of a circle with a radius of 5. Note the program must implement copy constructors. 


Write a ‘C++’ program (capable of being compiled on any standard ‘C++’ compiler and

in particular Bloodshed Dev-C++ compiler, the one that we use for our course.

The program will need to calculate the final mark and corresponding grade and letter

grade based on the information given below. 


3.1 Write a Java program that will compute the future investment value at a given interest rate for a specified number of years. The java program should have a minimum of two classes.

3.1.1 classA

 The main method (starting point) (5)

 The object of classb (5)

 Should also call the void method named futureInvestmentValue (double investment Amount, double monthlyInterestRate, int years) (15)

3.1.2 classB

 A get method named count_words(String str) (15)

Expected Output:

Input the investment amount: 28000

Input the rate of interest: 7

Input number of years: 6

Years Future Value

1. 30024.12

2. 32194.57

3. 34521.92

4. 37017.51

5. 39693.51

6. 42562.95 


Write a program to read two alphabetical characters and print all the characters in-between them including the given ones. Consider the 26 alphabets in cyclic order.

Note: use lower case letters for input and output.

For example:


Test Input Result

1 k o k l m n o

2 y a y z a


4. Operation: Operation

by CodeChum Admin

You have been cordially invited to partake in Operation: Operation. Your mission, should you choose to accept it, is to take the two numbers and the operator given then perform the operation successfully.


Instructions:

  1. Input one number (integer or decimal), an operator (+, -, *, /), and another number (integer or decimal).
  2. Print the result of the operation between the two numbers, up to 2 decimal places.

Instructions

  1. Input one number (integer or decimal), an operator (+, -, *, /), and another number.
  2. Print the result of the operation between the two numbers, up to 2 decimal places.

Input

The first line contains the first number.

The second line contains the operator.

The third line contains the second number.

5
+
0.70

Output

A line containing a decimal/float containing two decimal places.

5.70


"The code should use If-Else-Elseif statement"


Modify the program from number 1 by adding a class and apply the "outside of a class function".

LATEST TUTORIALS
APPROVED BY CLIENTS