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
Write a program that takes an integer n as a parameter and sums all of the multiples of 2 or 5 from 1 to n. For example, if n =
Alex

Answer:

// here is code in c++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main() {

// variable

int num;

int tot_sum=0;

cout<<"enter a number: ";

// read the value of n

cin>>num;

// check the multiple of 2 or 5 from 1 to n

for(int x=1;x<=num;x++)

{

// if multiple of 2 or 5 then add them

   if(x%2==0 ||x%5==0)

   {

       tot_sum=tot_sum+x;

   }

}

// print the sum

cout<<"sum of multiple of 2 or 5 is:"<<tot_sum<<endl;

return 0;

}

Explanation:

Read the number "n" from user.Check every number from 1 to n, if it is a multiple of 2 or 5 then add them to "tot_sum".When the for loop end, "tot_sum" will have sum of all the number which are either multiple of 2 or 5.Print the sum.

Output:

enter a number:11

sum of multiple of 2 or 5 is:35

4 0
2 years ago
Description:
Nastasia [14]

Answer:

The programming language is not stated (I'll answer using C++)

#include <iostream>

using namespace std;

int convert(float miles)

{

   return miles * 5280;

}

int main() {

   cout<<"Console:"<<endl;

   cout<<"Hike Calculator"<<endl;

   float miles;

   char response;

   cout<<"How many miles did you walk?. ";

   cin>>miles;

   cout<<"You walked "<<convert(miles)<<" feet"<<endl;

   cout<<"Continue? (y/n): ";

   cin>>response;

   while(response == 'y')

   {

   cout<<"How many miles did you walk?. ";

   cin>>miles;

   cout<<"You walked "<<convert(miles)<<" feet"<<endl;

   cout<<"Continue? (y/n): ";

   cin>>response;

   }

   cout<<"Bye!";

   return 0;

}

Explanation:

Here, I'll explain some difficult lines (one after the other)

The italicized represents the function that returns the number of feet

<em>int convert(float miles) </em>

<em>{ </em>

<em>    return miles * 5280; </em>

<em>} </em>

The main method starts here

int main() {

The next two lines gives an info about the program

   cout<<"Console:"<<endl;

   cout<<"Hike Calculator"<<endl;

   float miles;

   char response;

This line prompts user for number of miles

   cout<<"How many miles did you walk?. ";

   cin>>miles;

This line calls the function that converts miles to feet and prints the feet equivalent of miles

   cout<<"You walked "<<convert(miles)<<" feet"<<endl;

This line prompts user for another conversion

   cout<<"Continue? (y/n): ";

   cin>>response;

This is an iteration that repeats its execution as long as user continue input y as response

<em>    while(response == 'y') </em>

<em>    { </em>

<em>    cout<<"How many miles did you walk?. "; </em>

<em>    cin>>miles; </em>

<em>    cout<<"You walked "<<convert(miles)<<" feet"<<endl; </em>

<em>    cout<<"Continue? (y/n): "; </em>

<em>    cin>>response; </em>

<em>    } </em>

   cout<<"Bye!";

8 0
3 years ago
The rock cycle _____.
creativ13 [48]
The best and most correct answer among the choices provided by the question is the second choice. The rock cycle <span>changes and recycles Earth's rocks. </span>I hope my answer has come to your help. God bless and have a nice day ahead!
8 0
3 years ago
If I use google incognito mode or a throwaway google account can my search history be tracked by Microsoft parental controls?
3241004551 [841]

nu it would not but if they call microsoft to check it then yez the history would show up for them but dont try to make it notice able so they dont have to call

6 0
2 years ago
George enters the types of gases and the amount of gases emitted in two columns of an Excel sheet. Based on this data he creates
Alex777 [14]

Answer:

data source

Explanation:

The main aim of a data source is for the gathering of all necessary information that is needed to access a data. Since he has used the information to create a pie chart, this means that some data were used for the creation of this pie chart. Hence the information used for the creation of the pie chart is the data source for the information illustrated on the pie chart.

3 0
3 years ago
Other questions:
  • Numeric data is stored in ___________ for direct processing.
    10·2 answers
  • Given the following class import java.util.ArrayList; public class RectangleTester { public static void main(String[ ] args) { A
    7·1 answer
  • Write a java program which uses methods for calculating the sum of any 5 non-zero integer digits that are input. The program mus
    8·1 answer
  • What are the features of Cobol language that make it suitable for programming business applications.
    6·1 answer
  • list the six external parts or "peripherals" of a computer system and identify which are output and which are input devices.
    15·1 answer
  • The stack pop operation
    10·1 answer
  • What is the purpose of a mutator?
    8·1 answer
  • How are search results organized?
    6·1 answer
  • Join my FNAF fan club discord
    6·2 answers
  • Is a dot matrix printer an impact or non-impact printer
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!