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]
3 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]3 years ago
4 0

Answer:

ypite58eitetustietiejtejtejte6jhyeyry7ryjr

You might be interested in
Jack was drinking a glass of water near his computer when his dog bumped his arm, spilling water on his keyboard. What is the fi
Anvisha [2.4K]

Answer:

4no. is the answer may be

3 0
3 years ago
Read 2 more answers
In pre-shared key mode, a passphrase should be at least ________ characters long.
alexandr402 [8]
10.......................................

8 0
3 years ago
______ is data that is entered into a computer. ______ is the result produced by a computer.
Umnica [9.8K]
Input
Output
(Sorry for not being detailed)
5 0
3 years ago
Instructions The population of town A is less than the population of town B. However, the population of town A is growing faster
weeeeeb [17]

Answer: The c++ program is given below.

#include <iostream>

using namespace std;

int main() {

float townA, townB, growthA, growthB, populationA, populationB;

    int year=0;    

cout<<"Enter present population of town A : ";

cin >> townA;  

cout<<endl<<"Enter present growth rate of town A : ";

cin >> growthA;

growthA = growthA/100;  

cout<<endl<<"Enter present population of town B : ";

cin >> townB;  

cout<<endl<<"Enter present growth rate of town B : ";

cin >> growthB;

growthB = growthB/100;  

do

{

    populationA = townA + (townA * growthA);

    populationB = townB + (townB * growthB);      

    townA = populationA;

    townB = populationB;      

    year++;      

}while(populationA < populationB);  

cout<<endl<<"After " <<year<< " years, population of town A is "<<populationA << " and population of town B is "<< population<<endl;

return 0;

}

Explanation:

All the variables for population and growth rate are declared with float datatype.

The user inputs the present population of both the towns.

The growth rate entered by the user is the percentage growth.

For example, town A has 10% growth rate as shown in the output image.

The program converts 10% into float as 10/100.

growthA = growthA/100;

growthB = growthB/100;

The above conversion is done to ease the calculations.

The year variable is declared as integer and initialized to 0.

The growth in population is computed in a do-while loop. After each growth is calculated, the year variable is incremented by 1.

The loop continues until population of town A becomes greater than or equal to population of town B as mentioned in the question.

Once the loop discontinues, the final populations of town A and town B and the years needed for this growth is displayed.

The new line is introduced using endl keyword.

The function main has return type int hence, 0 is returned at the end of the program.

6 0
3 years ago
2-3 Calculating the Body Mass Index (BMI). (Programming Exercise 2.14) Body Mass Index is a measure of health based on your weig
Luden [163]

Answer:

weight = float(input("Enter your weight in pounds: "))

height = float(input("Enter your height in inches: "))

weight = weight * 0.45359237

height = height * 0.0254

bmi = weight / (height * height)

print("Your BMI is: %.4f" % bmi)

Explanation:

*The code is written in Python.

Ask the user to enter weight in pounds and height in inches

Convert the weight into kilograms and height into meters using given conversion rates

Calculate the BMI using given formula

Print the BMI

5 0
3 years ago
Other questions:
  • Structure for forloop?
    10·1 answer
  • The Transmission Control Protocol (TCP) splits each message into multiple packets. It's possible for packets from the same messa
    10·1 answer
  • Your task is to write and test a function which takes one argument (a year) and returns True if the year is a leap year, or Fals
    5·1 answer
  • A palindrome is any word, phrase, or sentence that reads the same forward and backward. Here are some well-known palindromes: Ab
    11·1 answer
  • Is the internet a private place?
    15·2 answers
  • E-mail messages, instant messages (IMs), or text messages sent and/or received within an organization a. are not included on a r
    9·1 answer
  • Why do we use a design process?
    13·2 answers
  • What do you hope will be in/added GTA 6?
    13·1 answer
  • Which of the following are picture adjustments that can be made to images?
    12·2 answers
  • Which of the following is NOT a reason we use subprograms?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!