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
aivan3 [116]
3 years ago
5

Consider the following C program. #include int main(void) { int i; printf ("Enter the value of i > "); scanf("%d",&i); if

(i>10 || i<=99) printf("%d",(i-i/10*10)*10+i/10); else printf("out of range"); return 0; } a- What is the output if the input i = 9? b- What is the output if the input i = 151?
Computers and Technology
1 answer:
Len [333]3 years ago
7 0

Answer:

When i=9 it is  90,  when i=151 it is 25.

Explanation:

The program asks the user to enter the value of the i. Then, i is checked. If i is greater than 10 or smaller than or equal to 99, the value of the equation, (i-i/10*10)*10+i/10), is printed. Otherwise, "out of range" is printed.

For i=9, since the value is smaller than or equal to 99, the if part will be executed. If you substitute 9 for the i in the equation, the output will be 90.

→ (9-9/10*10)*10+9/10) (Since both numbers are integers in 9/10, it is 0, not 0.9)

→ (9-0*10)*10+0)

→ (9)*10

→ 90

For i=151, since the value is greater than 10, again the if part will be executed. If you substitute 151 for the i in the equation, the output will be 25.

→ (151-151/10*10)*10+151/10) (Since both numbers are integers in 151/10, it is 15, not 15.1)

→ (151-15*10)*10+15)

→ (151-150)*10+15)

→ 1*10+15

→ 25

You might be interested in
What are the advantage of an e-library​
Semmy [17]

Answer:

Makes it easier to read... summarize cite electronic versions of editions

3 0
1 year ago
Which step do you think is most useful from big data life cycle.why?
12345 [234]

Explanation:

Business xase evaluation is most useful because (BCA) provides a best-value analysis that considers not only cost but other quantifiable and non-quantifiable factors supporting an investment decision. This can include but is not limited to, performance, producibility, reliability, maintainability, and supportability enhancements.

Mark me brainliest

7 0
2 years ago
Need the answer ASAP !!!!
Nuetrik [128]

Answer:

periodic checks

Explanation:

6 0
3 years ago
Dev10 is an Active Directory Domain Services (AD DS) domain member that runs Windows 10 Enterprise.
zubka84 [21]
Do I suppose to answer a question please let me know
8 0
3 years ago
State three positive uses of the computer in the government sector​
WINSTONCH [101]

Well Here I got 4

1. Email Functions

2. Distributing Payments

3. Record Keeping

4. Direct Mail Promotions

<em>Have A great night!</em>

<em></em>

6 0
4 years ago
Other questions:
  • Ming is building an inexpensive computer to use for her online classes, and needs to purchase Windows. What is the most cost-eff
    8·1 answer
  • When creating a scene in Blender, you should change Blender Render to ______ to create the best lighting option?
    15·1 answer
  • The unique physical address burned into every network interface card is its:
    15·1 answer
  • Elisa and Josh need to access General Help. Elisa will press the F1 key. Josh will click on ? in the upper-right corner of the W
    14·2 answers
  • Which type of cloud computing offers easily accessible software and applications on the machines?
    7·1 answer
  • To communicate with coworkers in the office
    10·1 answer
  • They have outlined their technical needs and have sent some of the documentation along with the potential provider's SLAs and te
    14·1 answer
  • Match the characteristics to the mobile operating system that it describes.
    6·1 answer
  • ¡Hola! He visto en muchos comentarios de Twitter "svd" cuando alguien dice "dale fav a este Tweet y siganse entre ustedes" y en
    8·1 answer
  • Leo needs to consolidate data in multiple worksheets by performing a calculation across all worksheets on the same cells.
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!