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
grigory [225]
3 years ago
6

How many inputs are included in the following requirement? REQUIREMENT: Write a program that asks the employee for their age. Th

e program must subtract the age from 65, and display the age, followed by the number of years left to retirement.
Computers and Technology
1 answer:
wolverine [178]3 years ago
4 0

Answer:

The correct answer for the given question is 1

Explanation:

Following are the program in c language  

#include<stdio.h> // header file

#include<conio.h>  //header file

void main()  // main method

{

int age,retiredAge;  // variable

clrscr();  // clear screen

printf("Enter Age : ");

scanf("%d",&age);  // input age

printf("************************");

retiredAge = (65-age);  // calculating retired age

printf("\nYour Age is %d",age);

if(retiredAge<0)  // checking condition

{

printf("\nYou are already cross the retired age. Or Enter Invalid Age.");

}

else

{

printf("\nNo of Years Left to retired is %d",retiredAge);  // dsiplay age

}

getch();

}

Output:

Enter Age : 50

************************

Your Age is 50

No of Years Left to retired is 15

Here Age is the only required input to calculate the retirement age of employee. if entered age is greater than 65 then a message is printed " You are already cross the retired age. Or Enter Invalid Age. " if entered age is valid then retiredAge is calculated with the formula retiredAge = (65-age). and finally display the age,followed by the number of years left to retirement.

Therefore  1 input are required for the above program.

You might be interested in
Why should cloud computing not be a set of silos? Provide real or made up examples of why incompatible solutions will fail in IT
lesya [120]
2 is tha answer to Why should cloud computing not be a set of silos? Provide real or made up examples of why incompatible solutions will fail in IT.?
8 0
2 years ago
In 1964 in London, Ontario one could buy a chili-dog and a root beer for $1.25, today the same chili dog and root beer cost $5.0
Marta_Voda [28]

Answer:

3% inflation rise. No correct cpi option

Explanation:

Consumer Price Index(CPI) is calculated by the Bureau of Economic Analysis and Statistics of a country monthly and annually.

Consumer Price Index(CPI) is used for measuring the changes in the price level of consumer goods and services purchased by households.

Calculating the consumer price index; price in 1964= $1.25, today price= $5.0.

Therefore, consumer price index= Price in today- price in 1964÷ price in 1964,.

Consumer Price index(CPI)= $(5-1.25)/1.25 = 3.75/1.25 = 3 Percent price inflation rise.

For the first cpi; 112-80/80= 0.4 percent( not equal to the 3 Percent inflation rise).

For the second cpi: 141.6-60/60= 1.36 Percent inflation rise(not equal to the 3 Percent inflation rise).

For the third CPI: 126.4-75/75 =0.68 percent inflation rise[not equal to the 3 Percent inflation rise].

For the third CPI: 108.5-90/90=0.21 percent inflation rise(not equal to 3 Percent inflation rise)

Therefore, none of the options are right.

5 0
3 years ago
Define a method printAll() for class PetData that prints output as follows with inputs "Fluffy", 5, and 4444. Hint: Make use of
QveST [7]

Answer:

public void printAll(){  // member function petAll()

   super.printAll();  //  calls printAll() method of the superclass (base class) AnimalData using super keyword

   System.out.print(", ID: " + idNum);} // prints the ID stored in the idNum data member of the PetData class

Explanation:

Here is the complete PetData class:

public class PetData extends AnimalData {  //

private int idNum;

public void setID(int petID) {

idNum = petID;  }

// FIXME: Add printAll() member function

/* Your solution goes here */

public void printAll(){

   super.printAll();

   System.out.print(", ID: " + idNum);}  }

PetData class is a subclass which is inherited from the base class AnimalData.

This class has a private data member which is the variable idNum which is used to store the ID value.

It has a member function setID with parameter petID which is the idNum. This method basically acts as a mutator and sets the user ID.

This class has another method printAll() that uses super keyword to access the method printAll() of the base class which is AnimalData

super basically refers to the base class objects.

Here the super keyword is used with the method name of subclass PetData in order to eliminate the confusion between the method printAll() of AnimalData and PetData since both have the same method name.

In the main() method the use is prompted to enter values for userName, UserAge and UserID. Lets say user enters Fluffy as user name, 5 as user age and 4444 as userID. Then the statement userPet.printAll(); calls printAll() method of PetData class as userPet is the object of PetData class.

When this method is called, this method calls printAll() of AnimalData class which prints the Name and Age and printAll() of PetData class prints the ID. Hence the program gives the following output:

Name: Fluffy, Age: 5, ID: 4444    

8 0
3 years ago
Finish the program to compute how many gallons of paint are needed to cover the given square feet of walls. Assume 1 gallon can
Zepler [3.9K]

Answer:

The program in Python is:

Area = float(input("Area: "))

print("Gallons: "+str(Area/350.0))

Explanation:

The requirement of the program is straightforward and what is required is to divide the inputted area by 350.

Hence, the explanation is as follows:

This line prompts user for Area

Area = float(input("Area: "))

This line calculates and prints the equivalent number of gallons

print("Gallons: "+str(Area/350.0))

4 0
2 years ago
¿Que importancia tienen los sensores para la agricultura?
PSYCHO15rus [73]

Answer:

La agricultura es el cultivo de cultivos y la cría de animales para producir alimentos, combustible, lana y otros productos que proporcionan los artículos que consumimos y utilizamos a diario.

La producción agrícola es una forma de producción que puede tardar hasta un año en completar un proceso desde la siembra hasta la cosecha y, por lo tanto, los sensores juegan un papel importante en la agricultura para el monitoreo y evaluación de cultivos y ganado.

Los tipos de sensores utilizados en la agricultura incluyen;

1) Sensores de ubicación (GPS)

2) Sensores ópticos (cámaras inteligentes) para análisis de suelo de campo remoto y análisis de distribución de plantas

3) Sensores electroquímicos (sensores de pH) que pueden medir el pH de los suelos

4) Sensor acelerómetro utilizado para el mantenimiento predictivo de componentes con partes móviles

5) Sensores mecánicos que determinan el requisito de capacidad de fuerza de un dispositivo que se utilizará en la granja.

6) Sensor de humedad para determinar el contenido de humedad del suelo

Explanation:

6 0
2 years ago
Other questions:
  • Which statement regarding socializers is true?
    10·2 answers
  • Discuss FOUR challenges that have an impact on domestic tourism
    6·1 answer
  • Please Help!!!<br> I keep getting this answer wrong
    10·1 answer
  • MS Excel is a powerful spreadsheet program that helps people with complex mathematical calculations. In what ways could you use
    10·1 answer
  • A technician is configuring the Windows computers on a network to print to a printer that is directly connected to the network v
    8·1 answer
  • Which symbol is at the beginning and end of a multiline comment block? &amp;&amp;&amp; """ %%% ###
    5·1 answer
  • The entirety of a packet at one Layer becoming the payload section at another is know as?
    11·2 answers
  • Can someone please type a code that makes a house in python and turtle graphics i need help
    9·1 answer
  • The User Datagram Protocol (UDP) is called the connectionless protocol because: It does not attempt to fix bad packets but resen
    8·1 answer
  • Is a device used to test the network connection.
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!