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
Tems11 [23]
2 years ago
13

Write a C++ program that determines if an integer is a multiple of 7. The program should prompt the user to enter and integer, d

etermine if it is a multiple of 7 by using a given formula and output the result. This is not meant to be a menu driven program so one run of the program will only offer one input and one output.
Computers and Technology
1 answer:
Dima020 [189]2 years ago
3 0

Answer:

#include <iostream>  // Needed for input/output operation

int main()  // define the main program

{

   int userNumber = 0; // number storage for user input

   std::cout << "Please enter an integer: ";  // Ask user for number

   std::cin >> userNumber;  // Assumes user input is an integer

   if (userNumber % 7 != 0)  // Check to see if 7 divides user input

       std::cout << "\nYour number is not a multiple of 7.\n";

   else

       std::cout << "\nYour number is a multiple of 7.\n";

   return 0;  // End program

}

You might be interested in
Consider the system of simultaneous equations:
FromTheMoon [43]

Answer:

System of linear equations is solved below and explained in detail.

Explanation:

Part a:

M = [1  3  5  2; 2  -4  7  -3; 0  -4  -7  3; 5  -3  2  1];

c =  [7;  -3;  -1;  0];

Part b:

The statement used for the solution of system of linear equation will be:

X = linsolve(M,c)

where X will give the values of x1, x2, x3, x4 respectively.

Part c:

The system is solved in matlab using above equation and the results are attached in a file.

The values for X are:

x1 = -2/7

x2 = 3/7

x3 = 4/7

x4 = 11/7

4 0
2 years ago
Rikki has had several problems at work recently. Her printer isn't printing correctly, copies from the copy machine come out wit
Ghella [55]
Create a maintenance schedule 
3 0
3 years ago
Read 2 more answers
What behaviors are most common in a successful entrepreneurship
Kryger [21]
1. Proper planning
2. Honesty
3. Being reasonable in pricing
4. Knowledge of what you’re offering
5. Being kind/good to your clients
8 0
3 years ago
If you are installing separate anti-virus and anti-spyware programs, which should you install first
Vera_Pavlovna [14]
Probably the anti virus, so you don't get a virus from downloading the anti spyware program.
6 0
3 years ago
A collection of related instructions organized for a common purpose is referred to as
marshall27 [118]
Computer or data. Lol
5 0
3 years ago
Read 2 more answers
Other questions:
  • I need help answering these questions!
    11·1 answer
  • To under a clip art you must do the following.
    14·1 answer
  • A(n) _____ is a telephone facility that manages incoming calls, handling them based on the number called and an associated datab
    5·1 answer
  • Which of the following bit patterns represents the value -9 in two’s complement notation?
    15·1 answer
  • What are copyright laws? Authority to reprint an original work as long as it's not for profit Entitlement to use and sell anothe
    15·2 answers
  • What is the correct html for referring to an external style sheet?
    11·1 answer
  • is a security design principle to direct the selection of control layers for an organization's computing enclave to ensure its r
    6·1 answer
  • Barbara, an employee, has properly connected her personal wireless router to a network jack inside her office. The router is una
    7·1 answer
  • A natural language processor comes across a sentence that contains the word “weightless.” The morphology component identifies th
    10·2 answers
  • Write an alogorithm and draw the Flow Chart to
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!