1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
mash [69]
2 years ago
13

Write a program that will ask the user for three different numerical values. The program should then decide whether the values a

re equally spaced. C++
Computers and Technology
1 answer:
tino4ka555 [31]2 years ago
8 0

Answer:

See the code in the Eplanation

Explanation:

// Online C++ compiler to run C++ program online

#include <iostream>

using namespace std;

int main() {

  int firstNumber;

  int secondNumber;

  int thirdNumber;

 

 

cout<< "Enter the firstNumber: ";

cin >> firstNumber;

cout << "Enter the secondNumer: ";

cin >> secondNumber;

cout << "Enter the thirdNumber: ";

cin >> thirdNumber;

int upperbound= abs(firstNumber-secondNumber);

int lowerbound= abs(secondNumber-thirdNumber);

if (lowerbound==upperbound){

cout << "The Three Numbers are Equally spaced";

   

}

  else{

      cout << "The Three Numbers are NOT Equally spaced";

}

}

You might be interested in
To bundle links together in order to improve bandwidth availability and redundancy, what protocol is used
Daniel [21]

Answer:

Link Aggregation Control Protocol

Explanation:

Link Aggregation Control Protocol can be used to assist in the formation of port channel bundles of physical links.

Link Aggregation Control Protocol is an IEEE standard defined in IEEE 802.3ad. LACP lets devices send Link Aggregation Control Protocol Data Units (LACPDUs) to each other to establish a link aggregation connection.

8 0
3 years ago
(in PYTHON) Write a function in REPL.it that uses three parameters, and squares the first, calculates mod 5 of the second parame
tatiyna

Answer:

I wrote this myself, it should be working. I think this is what the instructions were looking for.

The code below should return

Squared: 1296  

Mod: 0        

Quadrupled: 16

Explanation:

def threeParams(squared, mod, quadruples):

   array = [squared, mod, quadruples]

   array[0] = squared ** 2

   array[1] = mod % 5

   array[2] = quadruples * 4

   return array

valueArr = threeParams(36, 15, 4)

print(f"Squared: {valueArr[0]}\nMod: {valueArr[1]}\nQuadrupled: {valueArr[2]}")

4 0
3 years ago
Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.UnsupportedCl
vlada-n [284]

Answer:

You need to make sure that the unsupportedclassversionerror is a sub class of the linkage bug. Its a class format error. And this error is given by JVM as it tries to study the class file who minor and major version numbers are outdated. This error has been arising since Java 1.2 and is being thrown during the run time as well as most precisely during the linking phase.

It indicates that the current JVM is not supporting the class file of the application,

Hence,we must verify the installed version of java.

Explanation:

You need to make sure that the unsupportedclassversionerror is a sub class of the linkage bug. Its a class format error. And this error is given by JVM as it tries to study the class file who minor and major version numbers are outdated. This error has been arising since Java 1.2 and is being thrown during the runtime as well as most precisely during the linking phase.

It indicates that the current JVM is not supporting the class file of the application,

Hence,we must verify the installed version of java.

And we need to install the Java latest version.

We can find the Java version by  

Java -version

The following class can help in finding the version number of the class file.

FindMajorVersion.java:

import java.io.FileInputStream;

import java.io.InputStream;

import java.io.File;

import java.io.IOException;

import java.io.DataInputStream;

public class FindMajorVersion {

 

    public static void main(String[] args) throws IOException {

         // Verify at least one argument is being passed to the application class.

         if(args.length < 1)

              throw new RuntimeException("Usage: FindMajorVersion <path_to_class_file>");

 

         // Make a buffer for storing the first 8 bytes of a file.

         byte[] buffer1 = new byte[8];

 

         // Create an InputStream  

         InputStream is1 = new DataInputStream(new FileInputStream(new File(args[0])));

 

         // Read the first 8 bytes of the file.

         is.read(buffer);

 

         // Print out the major version number.

         System.out.println(buffer1[7] + " (" + String.format("0x%x", buffer1[7]) + ")");

 

         // Shut down the stream.

         is.close();

    }

}

You can thus find the appropriate version, and upgrade the java which is installed to the latest version. And thus, you can make it certain that all the Java apps are successfully executed inside the system.  

3 0
3 years ago
Setting your __________ will prevent you from having to type your name in every email.
Kay [80]

I believe its D. Signature.

7 0
3 years ago
Read 2 more answers
How can u tell which component react is large.
garri49 [273]

Answer:

So, if you check the contents of GridComponent.js you'll see that React is inside. In your case, this GridComponent.js is your "bundled file" (it will contain all the dependencies that you've imported). That's why it seems to be "large", because this file contains your component and react itself

Explanation:

8 0
3 years ago
Other questions:
  • How much does a Canon PowerShot G7X cost in America?
    14·1 answer
  • Odbc works on the ____ operating system.
    5·1 answer
  • What is the value of length after the code that follows is executed?int[][] nums = { new int [] {1, 2, 3},new int [] {3, 4, 5, 6
    8·1 answer
  • Define the ADT list: its properties and methods
    14·1 answer
  • A) A cable that is mainly used in the cable television network
    11·1 answer
  • Where is permanent data in the computer stored whenever gym starts his laptop He sees some commands in numbers appearing on the
    12·1 answer
  • Greg works outside. He is often found cutting grass and making the local park grounds look nice for guests.
    10·1 answer
  • Who watches the show gravity falls, if you do, if you play the theme song for the first episode backwards you get a hiding messi
    11·2 answers
  • Pleaseeeeeeeee I will give a brainliest
    7·1 answer
  • You find information that you know to be classified on the internet. What should you do.
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!