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

6. Integer Pairing

by CodeChum Admin

Now this one's a tad bit tricky, but you can definitely do it!


Instructions:

  1. Input five integers in one line, with each integer separated by a space.
  2. Add the 1st and 2nd integers together, store the sum inside a variable.
  3. Add the 3rd and 4th integers together, store the sum inside a variable.
  4. Multiply the two sums with each other and raise the product to the power of the 5th integer
  5. Print out the result.

Instructions

  1. Input five integers in one line, with each integer separated by a space.
  2. Add the 1st and 2nd integers together, store the sum inside a variable.
  3. Add the 3rd and 4th integers together, store the sum inside a variable.
  4. Multiply the two sums with each other and raise the product to the power of the 5th integer
  5. Print out the result.

Input

A line containing five integers separated by a space.


1·2·3·4·5

Output

A line containing an integer.


4084101

write a c++ program to "Find the 3% total salaries of John, Paul and Simon."


Write a program that asks the user for an integer greater than 0 and then use a for-loop to


calculate the factorial of that positive integer.


Modify your program so that the output looks like the following:


Example: 5! = 5 x 4 x 3 x 2 x 1 = 120


Create a for-loop that loops from 0 up to and including 20. On each iteration, output a '*' (an asterisk) if the value of the counter variable is divisible by 2, a '@' if divisible by 3, and a '$' if divisible by 4. In all other cases, output a '!'. Each symbol should be printed on a different line.


Write a program that asks the user for an integer greater than 0 and then use a for-loop to


calculate the factorial of that positive integer.


Modify your program so that the output looks like the following:


Example: 5! = 5 x 4 x 3 x 2 x 1 = 120


Create a for-loop that loops from 0 up to and including 20. On each iteration, output a '*' (an asterisk) if the value of the counter variable is divisible by 2, a '@' if divisible by 3, and a '$' if divisible by 4. In all other cases, output a '!'. Each symbol should be printed on a different line.


Create a library management system with full source code.

  • Write pseudocode to plan the logic for an application for a furniture company. The program needs to determine the price of a table depending on the user’s input.
  • Prompt the user to choose 1 for pine, 2 for oak, or 3 for mahogany.
  • The output is the name of the wood chosen, as well as the price of the table made of that wood. Pine tables cost $120, oak tables cost $325, and mahogany tables cost $420.
  • If the user enters an invalid wood code, set the price to 0, and inform the user what the error is.
  • Include a prompt in the application to ask the user to specify a (1) large table or a (2) small table but only if the wood selection is valid. Add $50 to the price of any large table, and add nothing to the price for a small table. Display an appropriate message if the size value is invalid, and assume the price is for a small table.
  • Include an explanation of your reasoning for writing the pseudocode the way you did.

Create a program that will calculate your grade in Prelim, Midterm, Prefinals, and Finals. After that, determine if you passed or failed in that subject based on your calculated grade.

 Rewrite the code in C++ using Factory Method. The goal is to remove the

main function’s dependency on the concrete classes, such as WalkToSchool.


#ifndef WALKTOSCHOOL_H

#define WALKTOSCHOOL_H

#include <iostream>

#include "GoToSchool.hpp"


using namespace std;


class WalkToSchool:public GoToSchool {

  void takeTransit() { cout << "We are walking to school." << endl; }

  void arrive() { cout << "After 10 minutes, we arrive." << endl; }

};


#endif


LATEST TUTORIALS
APPROVED BY CLIENTS