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
worty [1.4K]
3 years ago
8

Write calls to printf to display the variable x in the following formats:

Computers and Technology
1 answer:
lys-0071 [83]3 years ago
8 0

Answer:

a) printf("%-5.3e",x);

b) printf("%10llu",x);

<h3>Explanation:</h3>

We can assign any value to x at the start of program:

For Example:

float x = 72.149;

Then in order to print exponential notation, left justified, in field size of 5 with 3 digits after the decimal point, we need to use the following format:

printf("%-5.3e",x);

where e represent exponential notation.

5 represents field size of 5 and 3 represents digits after decimal point.

In order to print x as right justified, in a 11 digit field, we need to use the following format:

printf("%10llu",x);

You might be interested in
SOLVE IN C:
RSB [31]

Answer:

#include <stdio.h>

#include <string.h>

int main(void) {

  char simonPattern[50];

  char userPattern[50];

  int userScore;

  int i;

  userScore = 0;

  scanf("%s", simonPattern);

  scanf("%s", userPattern);

  for(i = 0;simonPattern[i]!='\0';i++){

         if(simonPattern[i]!=userPattern[i]){

            userScore=i;

            break;

     }

  }

  printf("userScore: %d\n", userScore);

  return 0;

}

Explanation:

  • Use a for loop that runs until it does not reach the end of simonPattern.
  • Check whether the current index of simonPattern and userPattern are not equal and then assign the value of i variable to the userScore variable and break out of the loop.
  • Finally display the user score.
4 0
3 years ago
The word Only is absolute or qualified
Semenov [28]

The word "only" is absolute.

5 0
3 years ago
Read 2 more answers
8.4 Lesson Practice <br> edhesive quiz
kow [346]

Answer:

1. 5

2. Because they let us quickly process the contents of an array, which have many values.

Explanation:

8 0
3 years ago
All of the following are the four more widely social media networks discussed in the text EXCEPT:
Elan Coil [88]
The answer is E) Groupon
8 0
3 years ago
Read 2 more answers
Every workplace should have an emergency plan of action.
pochemuha

Answer:

yes i agree with that the answer is in fact true

Explanation:

follow my in sta gram at grac.ehihi

6 0
2 years ago
Read 2 more answers
Other questions:
  • . Stress can affect not only your health, but also other aspectsof your
    15·1 answer
  • "The fact that we could create and manipulate an Account object without knowing its implementation details is called"
    9·1 answer
  • Please help! (I cant figure out)
    13·1 answer
  • Laura wants to know more about the organization to which she has applied. What can she do to know more about the organization’s
    12·1 answer
  • CodeHS 3.4.5. What is the code for four colored triangles.
    8·1 answer
  • Which CSS attribute would change an element's font color to blue
    15·2 answers
  • Which type of image uses lossy compression to reduce file size?
    14·1 answer
  • A lookup field allows the user to select from a list of values when updating the contents of a field. true or false.
    11·1 answer
  • Create the following new exceptions: PokemonException, which extends the Exception class. It must have a no-parameter constructo
    13·1 answer
  • Using a tag, set the color to orange for all tags
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!