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
jeka94
4 years ago
8

Write a program that has a while loop to print out the first five multiples of 15, 43, and 273 between the numbers of 3168 and 3

76020. Put each of the three sets of multiples on a new line.
Computers and Technology
1 answer:
Reika [66]4 years ago
7 0

Answer:

#include <iostream>

using namespace std;

void printmultiples(int n) //function to print first five multiples between 3168 and 376020

{

   int a =3168,c=1;

   cout<<"First five multiples of "<<n<<" are : ";

   while(a%n!=0 && a<=376020) //finding first mutiple of n after 3168.

   {

       a++;

   }

   while(c<6)//printing multiples.

   {

       cout<<a<<" ";

       a+=n;

       c++;

   }

   cout<<endl;

}

int main() {

   int t,n;

   cin>>t;//How many times you want to check.

   while(t--)

   {

       cin>>n;

       printmultiples(n);//function call..

   }

return 0;

}

Input:-

3

15

43

273

Output:-

First five multiples of 15 are : 3180 3195 3210 3225 3240  

First five multiples of 43 are : 3182 3225 3268 3311 3354  

First five multiples of 273 are : 3276 3549 3822 4095 4368

Explanation:

I have used a function to find the first five multiples of the of the numbers.The program can find the first five multiples of any integer between 3168 and 376020.In the function I have used while loop.First while loop is to find the first multiple of the integer n passed as an argument in the function.Then the next loop prints the first five multiples by just adding n to the first multiple.

In the main function t is for the number of times you want to print the multiples.In our case it is 3 Then input the integers whose multiples you want to find.

You might be interested in
______ occurs when the system finds itself spending so much time swapping pages into and out from memory that little time is lef
satela [25.4K]

Answer:

Option b is the correct answer for the above question.

Explanation:

Thrashing occurs when the virtual memory of the computer is more used. It is because the system does not have more memory. That's why the virtual memory is busy in the paging or other work of the operating system and there is no memory left for the other useful work of the system and then Thrashing occurs.

The question statement states the same which is described above and this is the cause when thrashing occurs. Hence the b option is correct. while other is not because--

  • Option "a" states about spooling but spooling is a concept of copy the data.
  • Option C states about an interrupt but it is a concept to stop the work of CPU when any input is coming from the outside.
  • Option D states about a pooling signal which is an operation of computers.

5 0
4 years ago
Plzzzzzzz help good answers only and best answer gets brainly
djverab [1.8K]

Answer:

Desmos (colab w/h math antics) , Calendar, Quizlet (colab w/h google) , Quizizz (colab w/h quizlet) , Kahoot (colab w/h google) , or Google Translate

7 0
3 years ago
Which one is it A,B,C,D
Yakvenalex [24]

I am pretty sure A is the answer because it makes most sense plugged into the sentence.

5 0
4 years ago
Read 2 more answers
Which of the following is a feature that allows you to temporarily store text? A wordvault, B Clipboard,C Normal View, D typeove
Sati [7]
Notes on an iPhone or Mac.
6 0
4 years ago
Create a Python script that takes two parameters to do the following:-
tekilochka [14]

Answer:

import sys, time

from os import walk, remove

from os.path import exists, join, getsize, getctime

file_counter = [ ]

folder_name, file_size = argv

isExist = exists( folder_name )

if folder_name == True:

    for root, folder, files in walk( folder_name ):

          for file in files:

               if getsize( join ( root, file ) ) >= file_size:

                   file_log = [ ]

                   file_log.append( file )

                   file_log.append( join ( root, file) )

                   file_log.append( time.ctime( getctime( file ) ) )

                   file_counter.append( file_log )

               else:

                   remove ( join ( root, file ) )

Explanation:

The python script above output the filename, size and file creation date of any folder passed to it.

6 0
3 years ago
Other questions:
  • Write a program that reads an unspecified number of integers, determines how many positive and negative values have been read, a
    13·2 answers
  • What is a key reason for assignning permissiongs when configuring file and share access?
    7·1 answer
  • After a suspected identity fraud case has been resolved, you should: AContinue to monitor your credit reports and accounts. BKee
    12·2 answers
  • Which statements are true about modern
    9·1 answer
  • The small company where you work needs to implement a second server for its accounting system, but does not have the funds to pu
    11·1 answer
  • What is information processing cycle​
    12·1 answer
  • Which of the following is NOT an acceptable way to create a color?
    14·1 answer
  • 9.3 Code Practice
    13·2 answers
  • How many combinations of 1s and Os can we make with 6 place values?
    12·1 answer
  • The temperature at 8 AM was 44°F and at noon it was 64°F. what was the percent of change from 8 AM to noon?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!