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
natita [175]
3 years ago
14

Write a script that prints the multiples of 7 between 0 and 100. Print one multiple per line and avoid printing any numbers that

aren't multiples of 7. Remember that 0 is also a multiple of 7.

Computers and Technology
1 answer:
Sedbober [7]3 years ago
8 0

Answer:

The program to this question can be described as follows:

Program:

#include <iostream> //defining header file

using namespace std;

int main() //defining main method

{

int x; //defining integer variable

for(x=0;x<=100;x++) //defining loop to count value from 0 to 100

{

   if(x%7==0) //check value is divisable by 7

   {

       cout<<x<<endl; //print value

   }

}

   return 0;

}

Output:

please find the attachment.

Explanation:

In the above code, an integer variable x is declared, which is used in the for loop, in this loop variable  "x" starts from 0 and ends when the value of x is less than and equal to 100.

  • Inside the loop an, if block is used that defines a condition that is (i%7==0), it will check, that the value is divided by 7.
  • In this loop, a print method is used, that prints its values.

You might be interested in
Help me please and thanks
Yuri [45]

Answer:

b

Explanation:

6 0
3 years ago
The range A2:B4 has how many cells?   A. 2   B. 4   C. 6   D. 8
olya-2409 [2.1K]
The answer to that is D.
3 0
3 years ago
Read 2 more answers
3. Write a program that prompts the user to input an integer that represents cents. The program will then calculate the smallest
miss Akunina [59]

Answer:

The program in Python is as follows:

cents = int(input("Cents: "))

qtr = int(cents/25)

cents = cents -qtr * 25

nkl = int(cents/5)

pny = cents -nkl * 5

print(qtr,"quarters,",nkl,"nickels,",pny,"pennies")

Explanation:

This gets input for cents

cents = int(input("Cents: "))

This calculates the quarters in cents

qtr = int(cents/25)

This gets the remaining cents

cents = cents -qtr * 25

This calculates the nickel in remaining cents

nkl = int(cents/5)

This calculates the pennies in remaining cents

pny = cents -nkl * 5

This prints the required output

print(qtr,"quarters,",nkl,"nickels,",pny,"pennies")

6 0
2 years ago
What does the following code alert?
goldenfox [79]

It is just a declaration of an object variable, <em>person</em>, in JavaScript. Within a <em>person</em> object, there are key:value pairs. The code that you  shared has the following keys: name, age, and favouriteFood, whereas the values of those keys are: Mike, 25, and pizza.


There is <em>no</em> alert statement in this code snippet; therefore, it <em>will not alert </em>anything. This code contains only a variable called <em>person, </em>and that's it!

5 0
3 years ago
Read 2 more answers
You want to read input from the user to know how many apples they would like
Daniel [21]

Answer:

var applesToBuy = readLine("How many apples would you lik

e? ");

Explanation:

It asks the user to enter answer the question and it stores the answer into the applesToBuy variable.

Its right dont worry.

6 0
2 years ago
Other questions:
  • Information technology is the study of managing, processing, and retrieving information.
    5·1 answer
  • T F The scope of a parameter is limited to the function which uses it.
    12·1 answer
  • Ryan is the operations manager for a national financial company. His company is in the process of creating a customer handbook.
    13·1 answer
  • All nuclear energy results in the rapid release of energy, such as in atomic bombs. true or false
    8·1 answer
  • Which types of computers are used by large businesses
    10·1 answer
  • What is a characteristic of maintaining logs in a system? A. Logging prevents security violations, but only deals with passive m
    10·1 answer
  • Translation of a file into a coded Format that occupies less space than the original file is called
    6·1 answer
  • hey guys just dropped some hot beats so go and follow me my user is the beats and comment if you would do that that would be gra
    11·1 answer
  • Write a program that reads a string and outputs the number of times each lowercase vowel appears in it. Your program must contai
    14·1 answer
  • Project stem test 3 answers
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!