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
Lorico [155]
3 years ago
5

Challenge activity 6.1.3 function call with parameters

Computers and Technology
1 answer:
Kobotan [32]3 years ago
5 0

Answer:

Printing formatted measurement Define a function PrintFeetinchShort, with int parameters numFeet and numinches, that prints using and "shorthand. End with a newline. Ex: PrintFeetinchShort(5, 8) prints: 5' 8" Hint: Use to print a double quote. ра 1 #include <stdio.hu 2 3 / Your solution goes here */ 4 5 int main(void) 6 int userFeet: 7 int user Inches: 8 9 scanf("%d", BuserFeet): 10 scanf("%d", Suser Inches); 11 12 PrintFeet InchShort(userFeet, user Inches); 13 14 return 0; 15) // Will be run with (5, 8), then (4, 11) Run

You might be interested in
As we move up a energy pyrimad the amount of a energy avaliable to each level of consumers
AleksandrR [38]

Explanation:

As it progresses high around an atmosphere, the amount of power through each tropic stage reduces. Little enough as 10% including its power is passed towards the next layer at every primary producers; the remainder is essentially wasted as heat by physiological activities.

8 0
3 years ago
Write a method named printOdd() that accepts an integer array as argument and print all the odd numbers in the array. You may as
Hoochie [10]

Answer & Explanation:

//written in java

public class Main {

   private static void printOdd(int[] list) {

       for (int value : list) {

           if (value % 2 == 1) {

               System.out.println(value);

           }

       }

   }

   public static void main(String[] args) {

       printOdd(new int[]{5, 6, 2, 3, 11, 4, 7});

   }

}

8 0
4 years ago
Write the definition of a function printAttitude , which hasan int parameter and returns nothing. The function prints amessage t
erastova [34]

Answer:

The function definition to this question can be given as:

Function definition:

void printAttitude(int x1) //define function printAttitude.

{

//nested else-if statements

if(x1==1)

 //if block

cout<<"disagree"<<endl;

//message

else if(x1==2)

 //else if block  

cout<<"no opinion"<<endl;

//message

else if(x1==3)

 //else if block

cout<<"agree"<<endl;

//message

else

cout<<" ";

}

Explanation:

In the above method definition firstly, we define a method that is "printAttitude". In this method, we pass an integer variable that is "x1". This function does not return any value because its return type is void. In this method, we use nested else-if statements. The description of these conditions can be given as:

  • In the if block we check the variable x1 value is equal to 1 If this condition is true. It will print "disagree" otherwise it will go to else-if block.  
  • In the else-if block, we check the variable x1 value is equal to 2 if the condition is true. It will print "no opinion". otherwise, we will go to another else-if block.
  • In this block, we check the variable x1 value is equal to 3 if this condition is true. It will print "agree".otherwise it will go to else block.
  • In the else block it will print nothing.
6 0
4 years ago
What is an interactive site where users write about personal topics
ycow [4]
This is called a blog.
6 0
3 years ago
(10 points) [Edhesive] 3.6 Code Practice
Digiron [165]

Answer:

  • You need to create a variable outside (before) the input loop.
  • You need a variable inside your loop that temporarily holds the user input.
  • In your loop, you will compare if the variable outside the loop is greater than (or less than) the new user input.

I don't know what program language you are using, but I will use python since it's easy to read and you will get the idea if you're using a different programming language.

<u>Code (Python)</u>

largestnum = 0

for x in range(6): <em>#loops 6 times</em>

   newnum = int(input("Enter a number: ")) #ask user for input & converts to int.

   if newnum > largestnum: <em>#if new number is greater than largest num </em>

     largestnum = newnum     <em>#make it the largest number</em>

<em>    </em>print("Largest:", largestnum)

The reason why you need a variable outside of the loop is because after the loop is done all variables inside the loop are trashed and can no longer be accessed outside of the loop.

3 0
4 years ago
Other questions:
  • If a disk drive has 8 surfaces and there are 1024 tracks per surface with 256 sectors per track and 512 bytes/sector. What is th
    9·1 answer
  • Explain in your own words how you can use MSCONFIG and Task Manager to troubleshoot problems on the computer.
    15·1 answer
  • Text messaging is an example of nonverbal communication. Please select the best answer from the choices provided. T F
    7·2 answers
  • 5. What is the purpose of OneDrive? A. OneDrive organizes files on an external hard drive. B. OneDrive allows the user to work o
    7·1 answer
  • Give two reasons you should be aware of your computer's system components and their characteristics.
    10·1 answer
  • Requirements description:
    6·1 answer
  • 1:A presentation program which is developed by Microsoft
    12·2 answers
  • Different the policies and protocols in the industry
    13·1 answer
  • Is Aerospace Engineering a more enjoyable major than Computer Engineering?
    5·1 answer
  • Cycle technology implemented a dibs initiative last year for one of the manufacturing sites. however, the initiative is not prog
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!