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
What is the value of creating recurring tasks?
scoundrel [369]

Answer:

✔️saves time spent manually creating multiple tasks

Explanation:

I did it on edge

4 0
2 years ago
Read 2 more answers
In Python, if var1 = “Happy” and var2= “Birthday” and var3 = (var1+var2) *2, then var3 stores the string
-Dominant- [34]

Answer:

A

Explanation:

var3 is happy + birthday, ×2

l.e happy birthday happy birthday

3 0
3 years ago
Ask the user to input their grade percentage (e.g. the use will enter 98 if they had an overall grade of 98% in their course) fo
Airida [17]

Answer:

In Python

def getpointValue(subject):

   if subject >= 75:        point = 4; grade = 'A'

   elif subject >= 60:        point = 3; grade ='B'

   elif point >= 50:        point = 2; grade = 'C'

   elif point >= 40:        point = 1; grade = 'D'

   else:        point = 0; grade = 'F'

   return point,grade

subjects= ["Accounting","Marketing","Economics","MIS"]

acct = int(input(subjects[0]+": "))

mkt = int(input(subjects[1]+": "))

eco = int(input(subjects[2]+": "))

mis = int(input(subjects[3]+": "))

acctgrade = getpointValue(acct)

print(subjects[0]+" Grade: "+str(acctgrade[1]))

mktgrade = getpointValue(mkt)

print(subjects[1]+" Grade: "+str(mktgrade[1]))

ecograde = getpointValue(eco)

print(subjects[2]+" Grade: "+str(ecograde[1]))

misgrade = getpointValue(mis)

print(subjects[3]+" Grade: "+str(misgrade[1]))

totalpoint = (acctgrade[0] + mktgrade[0] + ecograde[0] + misgrade[0]) * 3

gpa = totalpoint/12

print("GPA: "+str(gpa))

Explanation:

<em>The solution I provided uses a function to return the letter grade and the point of each subject</em>

<em>I've added the explanation as an attachment where I used comment to explain difficult lines</em>

<em />

Download txt
6 0
3 years ago
What does AU stand for in computer?
SpyIntel [72]

Answer:

AU stands for <em>Audio Units.</em>

7 0
2 years ago
What should a pwc operator do to minimize the risk of accident or injury?
Natasha_Volkova [10]
PWC stands fro personal water craft (aquascooter, jet bike, jet ski, wave runner, ski free, motorised surfboard etc.). The operator of PWC must be at least 16 years old.
In order to minimize the risk of accident or injury the PWC operator must follow several rules:
- the pwc operator should know the boating rules
- to monitor the speed of the vessel to ensure that a safe speed is being maintained.
- to adhere to the 5 knot rule (approximately 10kph) when close to shore, other boats (including boats at anchor) around dive flags and swimmers, fixed structures (ramps and jetties)
3 0
3 years ago
Other questions:
  • Your Economics teacher has asked you to create a chart showing how supply and demand affects the price of gasoline. Which applic
    13·2 answers
  • Your health insurance company gives you a discount if you wear a fitness-tracking bracelet. After wearing it for a few months, y
    5·1 answer
  • fill down feature on a formula and you need to keep a cell reference the same which one will allow you to keep the same cell ref
    15·1 answer
  • What procedures are involved in saving a file for the first time?
    10·2 answers
  • Which of the following websites can help you learn about general career trends?
    13·1 answer
  • Administrative activities, such as archiving project files, closing out contracts, documenting lessons learned, and receiving fo
    15·1 answer
  • What are the top ten alternative songs of the 2000's?
    7·1 answer
  • What is the datapath of add instruction?
    6·1 answer
  • Sorry, I cant tell you, you need to know
    5·2 answers
  • Which window would show you bindings for local area connection 2?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!