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
Ivenika [448]
3 years ago
7

Define a function SetTime, with int parameters hoursVal and minutesVal, that returns a struct of type TimeHrMin. The function sh

ould assign TimeHrMin's data member hours with hoursVal and minutes with minutesVal.
Computers and Technology
1 answer:
Lapatulllka [165]3 years ago
4 0

Answer:

#include <stdio.h>

typedef struct TimeHrMin_struct //struct

{

int hours;

int minutes;

} TimeHrMin;

struct TimeHrMin_struct SetTime(int hoursVal,int minutesVal) //SetTime function

{

struct TimeHrMin_struct str;

str.hours=hoursVal; //assigning the values

str.minutes=minutesVal;

return str; //returning the struct

}

int main(void)

{

TimeHrMin studentLateness;

int hours;

int minutes;

scanf("%d %d", &hours, &minutes);

studentLateness = SetTime(hours, minutes); //calling the function

printf("The student is %d hours and %d minutes late.\n", studentLateness.hours, studentLateness.minutes);

return 0;

}

Explanation:

You might be interested in
Of the measures of feasibility in the accompanying figure, ____ considers points such as "Does the proposed platform have suffic
Pavel [41]

Answer:b. technical feasibility

Explanation: Technical feasibility is an important tool for both troubleshooting and maintenance,it is the process through which an expert evaluates a process or a product in order to determine what can either be achieved or to the extent to which a certain action will lead to a tangible result.

Technical Feasibility is one of the most important factor when making decisions on the use of materials or equipments in a particular environment or condition.

8 0
3 years ago
Write an expression that computes the integer average of the int variables exam1 and exam2 (both declared and assigned values).
Minchanka [31]

Answer:

#include <iostream>

using namespace std;

int main()

{

   int exam1 = 70;

   int exam2 = 85;

   int examAverage;

   examAverage = (exam1+exam2)/2;

   cout <<"The Average of Exam1 and Exam2 is: "<<examAverage<<endl;

   return 0;

}

Explanation:

Using the C++, we declare the three variables all of type

exam1

exam2 and

examAverage

We assign initial values of 70 and 85 to exam1 and exam2 respectively

7 0
3 years ago
How long does it take to wire a house?
Licemer1 [7]

Answer:

the rewiring of an entire home may take up to a week. Smaller jobs, like wiring a single room, may take one to two days

Explanation:

4 0
3 years ago
Read 2 more answers
The block of code below is supposed to display “multiple of 5” if the positive number value is in fact a multiple of 5
12345 [234]

Answer:

Answer is (value MOD 5) = 0.

Explanation:

A number A is multiple of another number B  if after dividing A by B remainder value is zero.

In mathematics modulo or (MOD) function is a function which returns remainder value after dividing two numbers.

Here in question for condition

( value MOD 5 ) = 0 code will print "Multiple of 5". For each value which is divisible by 5 we will get zero remainder implying that value is a multiple of 5.

3 0
3 years ago
python. create a program that asks the user to input their first name and their favorite number. Then the program should output
blondinia [14]

name = input("What is you name?")

fav_number = input("What is you favorite number?")

print(name + " your favorite number is " + fav_number + "!")

7 0
3 years ago
Other questions:
  • In the two-level directory, if a user refers to a particular file then__________________ Select one: a. only his/her own UFD (us
    7·1 answer
  • Which type of system must you connect to and use to make changes to Active Directory?
    15·1 answer
  • 2. What is the purpose of an outline? (1 point)
    8·1 answer
  • Let’s say you’re publishing a message with the Hootsuite Composer. The message contains a link to a landing page, and you want t
    9·1 answer
  • What is also known as a visual aid in presentation
    15·1 answer
  • Zack sees an online contest. He could win $10,000 instantly! On the sign-up form he enters his name and email address. He is als
    9·1 answer
  • 7. Which cipher is based on the clues of the physical factors, rather than the hardware or a software cryptosystem
    8·1 answer
  • Submit your business presentation that clearly compares and contrasts three different cell phone service plans..
    14·2 answers
  • Which are the 2 main elements that’s make up computer architecture?
    6·2 answers
  • 2
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!