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
Whitepunk [10]
3 years ago
15

1)Create a conditional expression that evaluates to string "negative" if userVal is less than 0, and "positive" otherwise. Examp

le output when userVal = -9 for the below sample program:
-9 is negative.
#include
#include

int main(void) {
char condStr[50] = "";
int userVal = 0;

userVal = -9;

strcpy(condStr, /* Your solution goes here */);

printf("%d is %s.
", userVal, condStr);

return 0;
}

2)

Using a conditional expression, write a statement that increments numUsers if updateDirection is 1, otherwise decrements numUsers. Ex: if numUsers is 8 and updateDirection is 1, numUsers becomes 9; if updateDirection is 0, numUsers becomes 7. Hint: Start with "numUsers = ...".

#include

int main(void) {
int numUsers = 0;
int updateDirection = 0;

numUsers = 8;
updateDirection = 1;

/* Your solution goes here */

printf("New value is: %d
", numUsers);

return 0;
Computers and Technology
2 answers:
SSSSS [86.1K]3 years ago
7 0
1. userVal < 0 ? "negative" : "positive"

2. updateDirection == 1 ? numUsers++ : numUsers--;
Licemer1 [7]3 years ago
5 0

Answer:

1:

if userVal<0

cout <<" negative":

userVale >0

cout<<"positive":

2:

if

updateDirection ==1;

numUsers++;

cout<<"numUser"

else

numUser--;

cout<<"numUser";

You might be interested in
Write a program that calculates the total amount of a meal purchased at a restaurant by a customer. The program should ask the u
Illusion [34]

Answer:

Python script is given below

Explanation:

charge = float(input('Enter the amount you were charged. $'))

#setting the formula for tip and tax

tip = charge*.18

tax = charge*.07

#printing the values

print('Charge for the food: %.2f' % charge)

print('The tip amount: %.2f' % tip)

print('Tax amount: %.2f' % tax)

print('Total amount: %.2f' % (charge+tip+tax))

7 0
3 years ago
Audacity functions with a computer that has a minimum of ______ of RAM and a 300 MHz processor.
soldier1979 [14.2K]
If i remember correctly...it should be 64 MB
Hope this helps
5 0
3 years ago
Read 2 more answers
Jody should select the
Alex Ar [27]

Answer:

In the View tab, you will find Zoom Option. Set the Zoom level to 100%.

Explanation:

You need to set the Zoom level to 100%, And you can do this, by setting the zoom level to 100%, from the scroll bar. Or you can move to view tab in the main menu, and then in the Ribbon, you need to select the zoom % and set it to 100 percent. You will then be able to see the entire page. And if you want, you can increase the Zoom level to even further, for getting an even more clearer picture.

3 0
3 years ago
I want to build a video player on the html5 canvas here is my code
jok3333 [9.3K]

Answer:

hospital yestrday after noon ggpupg ki tyutrdcbhsjdvshsjjshsgsgdhsusfsuwwiiwhszia

8 0
1 year ago
Jordan has been asked to help his company find a way to allow all the workers to log on to computers securely but without using
lana66690 [7]

Answer:

Webcam

Explanation:

A webcam is mainly used for taking images or videos from the computer. the webcam is a combination of two basic words i.e. web and camera. webcam can be connected to any computer via USB. It can be mounted on the desktop and sometimes it comes inbuilt on the laptops.

A webcam is also used for face recognition function to login to a computer system.

so according to the scenario, the most appropriate answer is a webcam.

6 0
3 years ago
Other questions:
  • Your mom wants to purchase a computer. She has heard about how the Windows 8 operating system is best-geared for a touch-enabled
    8·1 answer
  • GAMES Which is better Roblox or BattleCamp Basically Free Points But Please Answer
    7·2 answers
  • Componets of computer
    5·1 answer
  • A) Write 600 as the product of prime factors.<br> Give your answer in index form.
    7·2 answers
  • Hurry please
    12·1 answer
  • Match the job description to the level of degree it requires.
    15·1 answer
  • In this assignment you will be building an implementation of the hypothetical machine simulator like the one discussed in chapte
    5·1 answer
  • Why do designers of smartphones hide computer processing details from
    14·2 answers
  • Hi am feeling really happy just passed a test after a lot of tries :-)
    5·1 answer
  • What is required to publish documents on the Web
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!