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

Define a method printFeetInchShort, with int parameters numFeet and numInches, that prints using ' and " shorthand. End with a n

ewline. Ex: printFeetInchShort(5, 8) prints: 5' 8" Hint: Use \" to print a double quote.

Computers and Technology
2 answers:
umka2103 [35]3 years ago
8 0

Answer:

public static void printFeetInchShort(int numFeet, int numInches){

      System.out.println(numFeet+"' "+numInches+"\"");

  }

Explanation:

Don't forget the brace!

worty [1.4K]3 years ago
4 0

Answer:

The program to this question as follows:

Program:

//header file

#include <iostream> //defining header file

using namespace std;

void printFeetInchShort(int numFeet,int numInches); //decalring method printFeetInchShort  

void printFeetInchShort(int numFeet,int numInches)//defining method printFeetInchShort

{

cout<<"height: "; // print message

cout<<numFeet<<"\'"<<""<<numInches<<"\""; //print value

}

int main() //defining main method

{

int numFeet, numInches; //defining integer variable

cout<<"Enter height feet: "; //print message

cin>>numFeet; //input value by user

cout<<"Enter height inches: "; //print message

cin>>numInches; //input value by user

printFeetInchShort(numFeet,numInches); //calling method printFeetInchShort    

return 0;

}

Output:

Enter height feet: 5

Enter height inches: 9

height: 5'9"

Explanation:

In the above C++ language program, first, a header file is included, that uses the basic function, in the next step, the "printFeetInchShort()" method is defined, in the method two integer variables passed as a parameter, inside this method a print function "cout" is used, that print user input value with single and double quote.

Then the main method is declared, inside this method two integer variables "numFeet and numInches" are defined, which is used to take input value by user and pass the value in "printFeetInchShort()" function parameter and call the function.

You might be interested in
In every programming language, when you access data stored in an array, it is important to use a ____ containing a value that ac
Stells [14]
Subscript

Reference: Chapter 5 of 'An Object-Oriented Approach to Programming Logic and Design's by Joyce Farrell
4 0
3 years ago
If num1 and num2 are the same, print equal.
boyakko [2]

num1 = some value

num2 = some value

if num1 == num2:

   print("equal")

You just need to provide the values for the numbers. I hope this helps!

4 0
3 years ago
The component that keeps all other engine parts in line<br>​
Bezzdna [24]

Answer:

engine block

explanation:

the answer would be engine block

5 0
4 years ago
In which of the following movies, multimedia's special effect is used ? *
Mila [183]

\qquad \qquad\huge \underline{\boxed{\sf Answer}}

The Correct choice is ~ D

In all these movies, multimedia's special effects are used

5 0
2 years ago
Read 2 more answers
Write a program that converts an input grade from 60 to 100 and outputs a converted grade from 0.0 to 4.0. a. Minimum input valu
devlian [24]

Answer:

import java.util.Scanner;

public class num7 {

   public static void main(String[] args) {

      Scanner in = new Scanner(System.in);

       System.out.println("Enter the grade 60-100");

       double grade = in.nextDouble();

       while(grade<60 ||grade>100){

           System.out.println("Enter a valid grade 60-100");

           grade= in.nextDouble();

       }

       double outVal;

       if(grade>=60 && grade<70){

            outVal = 0.0;

       }

       else  if(grade>=70 && grade<80){

           outVal = 1.0;

       }

       else  if(grade>=80 && grade<90){

           outVal = 2.0;

       }

       else if(grade>=90 && grade<100){

           outVal = 3.0;

       }

       else{

           outVal = 4.0;

       }

       System.out.println("The converted grade is: "+outVal);

   }

}

Explanation:

  1. The program is written in Java
  2. User is prompted to enter a grade between 60-100
  3. A while loop is used to validate user input
  4. If/else if/else statements are used to convert the values as required
  5. the output value is stored as a double

6 0
4 years ago
Other questions:
  • 4. When emergency changes have to be made to systems, the system software may have to be modified before changes to the requirem
    13·1 answer
  • If images around the edges of a monitor do not look right, the computer might have a(n) access problem. hardware problem. Intern
    13·2 answers
  • 14.18 Lab 5d - Nested Looping Write a program that:
    10·1 answer
  • What skills used in video game play could be useful in scientific problem-solving games such as Foldit?
    15·1 answer
  • How do you navigate multiple computer screen at one time?
    5·1 answer
  • Aaron is stating the main idea of what he read in his own words. He is _____.
    11·2 answers
  • What is the default return type of a method in Java language?
    9·2 answers
  • From which latin word the word computer is derived​
    7·1 answer
  • This is me lol jjaaaabbooo
    13·1 answer
  • 2.9.8 stop light codehs
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!