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
Kisachek [45]
2 years ago
5

Write a program with a "function" named "getMinFromInput()" that reads a list of integers from the keyboard and returns the smal

lest "positive" number entered. For example, if user enters 0 3 -2 5 8 1, it should return 1. The reading stops when 999 is entered.
Your main function should call this getMinFromInput() function and print out the smallest "positive" number. c++

#include
using namespace std;

int main() {

/* Type your code here. */

return 0;
}
Computers and Technology
1 answer:
ella [17]2 years ago
4 0

Answer:

ypite58eitetustietiejtejtejte6jhyeyry7ryjr

You might be interested in
For which of the following is a bulleted list more appropriate than a numbered list?
Vedmedyk [2.9K]
THE ANSWER IS A!!!!!!!!!!!!!!!!!!!
5 0
3 years ago
A small grocery store has one checkout.You have been asked to write a program to simulate the grocery store as it checks out cus
Masteriza [31]

Answer:

Check the explanation

Explanation:

PYTHON CODE :

#import random function

from random import randint

#class Queue declaration

class Queue:

#declare methods in the Queue

def __init__(self):

self. items = []

def isEmpty(self):

return self. items == []

def enqueue(self, item):

self.items. insert(0, item)

def dequeue(self):

return self. items. pop()

def size(self):

return len(self. items)

def getInnerList(self):

return self.items

#This is customer Queue

class Customer:

#declare methods

def __init__(self,n):

self.numberOfItems=n

def __str__(self):

return str(self. numberOfItems)

def getNumberOfItems(self):

return self. numberOfItems

#This is expresscheker customer queue

class Expresschecker:

def __init__(self,n):

self.numberOfItems=n

def __str__(self):

return str(self. numberOfItems)

def getNumberOfItems(self):

return self. numberOfItems

#Returns random checkout time, based on number of items

def checkOut(Expresschecker):

items = Expresschecker. getNumberOfItems()

if items <= 10:

return randint(2, 5)

if items <= 20:

return randint(6, 9)

return randint(10, 14)

#Initiate queue for the Expresschecker

Expresschecker = Queue()

#declare total customers

totalcheckoutCustomers = 10

#express Customers shopping..

for i in range(totalcheckoutCustomers):

#Each putting Between 1 to 25 items

randomItemsQty = randint(1, 25)

customer = Customer(randomItemsQty)

#Getting into queue for checkout

Expresschecker. enqueue(customer)

#====Now all express Customers having

#random qty of items are in Queue======

#intial time

totalTime=0

#define the size of the queue

totalcheckoutCustomers = Expresschecker. size()

#using for-loop until queue is empty check out

#the items in the express cheker queue

while not(Expresschecker. isEmpty()):

totalTime+=randint(1,5)

#Picking a customer

expresscustomer = Expresschecker. dequeue()

#Processing the customer

timeTaken = checkOut(expresscustomer)

#add the time for each custimer

totalTime+=timeTaken

#compute average waiting time

averageWaitingTime = totalTime/totalcheckoutCustomers

#display the average waiting time

print("Average waiting time for the express customer queue is "

+str(averageWaitingTime)+" minutes ")

print("Remaining Custimers in the express customer Queue is: ",

Expresschecker. size())

#Returns random checkout time, based on number of items

def checkOut(customer):

items = customer. getNumberOfItems()

if items <= 10:

return randint(1, 5)

if items <= 20:

return randint(6, 10)

return randint(11, 15)

#in

customersQueue = Queue()

totalCustomers = 20 #Change number of customers here

#Customers shopping..

for i in range(totalCustomers):

#Each putting Between 1 to 25 items

randomItemsQty = randint(1, 25)

customer = Customer(randomItemsQty)

#Getting into queue for checkout

customersQueue. enqueue(customer)

#====Now all Customers having random qty

#of items are in Queue======

totalTime=0

totalCustomers = customersQueue. size()

while not(customersQueue. isEmpty()):

totalTime+=randint(1,5)

#Picking a customer

customer = customersQueue. dequeue()

#Processing the customer

timeTaken = checkOut(customer)

totalTime+=timeTaken

#Result=============================

averageWaitTime = totalTime/totalCustomers

print("Average wait time for the customer queue is

"+str(averageWaitTime)+" minutes ")

print("Remaining Customers in the customer Queue is:

",customersQueue. size())

5 0
3 years ago
Which one can be used as watermark in a word document?​
otez555 [7]

Answer:

On the Design tab, select Watermark.

In the Insert Watermark dialog, select Text and either type your own watermark text or select one, like DRAFT, from the list. Then, customize the watermark by setting the font, layout, size, colors, and orientation. ...

Select OK.

4 0
3 years ago
How you will install an operating system on your computer
defon
Someone can install an operating system by disk or removable storage media.

Disk being floppy, tape or commonly a DVD.

Removable storage being a USBdrive.
5 0
3 years ago
A(n) ____ algorithm is a set of specific, sequential steps that describe in natural language exactly what a computer program mus
Paul [167]
<span>The answer is algorithm, because computer programmers need a programming language that's more similar to their native language. They then write specific steps a computer must take to complete the task at hand. Machine code is not easily memorized and is foreign to most people.</span>
8 0
3 years ago
Other questions:
  • A website wants to gives out detailed information to viewers about its upcoming conference and also provides a feature for searc
    10·1 answer
  • Assume that printStars is a function that takes one argument and returns no value. It prints a line of N stars (followed by a ne
    13·1 answer
  • Suppose you send data to the 11111111 11111111 11111111 11111111 ip address on an ipv4 network. to which device(s) are you trans
    15·1 answer
  • 8) The higher the drag coefficient, the_____ the car will go<br> a)Siower<br> b)Faster
    9·2 answers
  • You coded the following class: public class N extends String, Integer { }When you compile, you get the following message:N.java:
    9·1 answer
  • Students enrolled in a digital classroom participate in discussions and take field trips with classmates. watch instructional vi
    11·1 answer
  • What are 3 examples of a idler gear in real life?
    7·1 answer
  • Dominic list his camera for sale on an online auction site Chloe is the highest bitter and purchase as the camera how does the a
    14·1 answer
  • How many 3 byte sequences contain at least five consecutive 0-bits
    7·1 answer
  • Quick I need help ASAP
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!