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
Juli2301 [7.4K]
3 years ago
10

(Language is in Java)

Computers and Technology
1 answer:
Gre4nikov [31]3 years ago
7 0

import java.util.Scanner;

public class InchesToFeetInteractive

{

public static void main(String[] args) {

   Scanner scan = new Scanner(System.in);

   final int INCHES_IN_FOOT = 12;

   int inches = scan.nextInt();

   int feet;

   int inchesLeft;

   feet = inches / INCHES_IN_FOOT;

   inchesLeft = inches % INCHES_IN_FOOT;

   System.out.println(inches + " inches is " +

   feet + " feet and " + inchesLeft + " inches");

   }

}

We import the Scanner class and then initialize a new Scanner named scan. We then get an integer representation of inches from the user and calculate the feet and inches from the value entered by the user.

You might be interested in
Which of the following is the estimate of the minimum amount of time it would take to perform a task? (Points : 2) Minimal durat
kondor19780726 [428]

Answer:

Optimistic duration

Explanation:

The following three concepts are Project management concepts:

Optismitic duration: Estimation of the shortest duration of a task, taking into account the difficulty, etc.

Pessimistic duration: Estamation of the longest duration of a task, taking into account the difficulty, etc

Expected duration: Expected duration of a task, kind of a compromise between the optmistic duration and the pessimistic duration.

Which of the following is the estimate of the minimum amount of time it would take to perform a task?

The answer is Optimistic duration

7 0
3 years ago
PLEASE HELP ASAP!!!!!!!!!!!
Bingel [31]

Answer:

True

Explanation:

3 0
3 years ago
Read 2 more answers
What does it mean if you tell a judge you are “taking the fifth”?
ziro4ka [17]
The fifth amendment states that “no person shall be compelled in any criminal case to be a witness against himself.”
5 0
4 years ago
Which of the following describes the main purpose of a model?
nalin [4]

Answer:

to demonstrate how something works.

Explanation:

hope it helps Brainlist?

8 0
3 years ago
2. Now write a program named filereader.py that reads and displays the data in friends.txt. This program should also determine a
Andrew [12]

Answer:

see explaination

Explanation:

# python code filereader.py

import sys

import readline

from sys import stdin

import random

## Open the file with read only permit

f = open('inputfile.txt')

## Read the first line

sum = 0.0

count = 0

#read file till the file is empty

while True:

line = f.readline()

if ("" == line):

print "Average age of friends is", sum/count

break

list = line.split()

print "My friend ",list[0], " is", list[1]

sum = sum + int(list[1])

count = count + 1

f.close()

'''

inputfile.txt

Denny 24

Penny 28

Lenny 20

Jenny 24

output:

My friend Denny is 24

My friend Penny is 28

My friend Lenny is 20

My friend Jenny is 24

Average age of friends is 24.0

see screenshot at attachment

6 0
3 years ago
Other questions:
  • Have you ever tried to teach a class full of restless, active sixth-graders? I have. I taught sixth-grade students for 12 years.
    15·1 answer
  • Chris needs to modify the default bullets that are used in a nonnumbered list in word. Which method should he use?
    9·2 answers
  • The user interface design principle that places an emphasis on the intuitive flow of the interface (i.e. left to right and top t
    12·1 answer
  • The different concepts in the architecture operating model are aligned with how the business chooses to integrate and standardiz
    10·2 answers
  • The Start menu on Windows computers changes based on actions performed by their users. True False
    15·2 answers
  • Memory, as a general construct, is best defined as A) the ability to briefly retain information in the senses. B) the long-term
    12·2 answers
  • If you used a peach as a model of an animal cell, what would the peach's skin represent? A.nucleus B.cell wall C.cytoplasm D.cel
    10·2 answers
  • What is the main advantage of using a WYSIWYG("what you see is what you get")editor when constructing a website
    5·1 answer
  • Does anyone know how to write this right? This is for a coding class and I’m super confused on it.
    13·1 answer
  • Explain employment opportunities in the networking field 
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!