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
Sholpan [36]
3 years ago
14

Write a do-while loop that continues to prompt a user to enter a number less than 100, until the entered number is actually less

than 100. end each prompt with newline. ex: for the user input 123, 395, 25, the expected output is: enter a number (<100: enter a number (<100: enter a number (<100: your number < 100 is: 25
Computers and Technology
1 answer:
worty [1.4K]3 years ago
4 0
Here's a solution in plain C:

int num;
do { printf("enter a number (<100)\n"); scanf_s("%d", &num, sizeof(num)); } while (num >= 100);
printf("your number <100 is %d", num);

Note that this solution has flaws. It is unclear what should happen when the user types a negative number or a floating point number. Also it doesn't handle incorrect input (e.g., "aaa") at all.

But you get the idea.
You might be interested in
In the blank LibreOffice Writer document, to start the process of entering a date field into a letter, click on the Insert menu.
trasher [3.6K]

what is the question? it just seems like directions

5 0
3 years ago
Read 2 more answers
Application software developed by the user or at the user’s request is called ____ software.
Zolol [24]
End-User Software. Because it is not professional

4 0
3 years ago
How can solve a Boolean algebra problem?<br><br> Ex: JK+(~J+~K)L+JK
kicyunya [14]
I am not sure what you mean by that but a boolean is either true or false. So it is kind of like a true or false question. 4+4=7 is false. 2*4!=48 is true.
8 0
3 years ago
Write the program to solve quadratic equations, but if the discriminant is negative, output
Firdavs [7]

Answer:

PROGRAM  QuadraticEquation Solver

  IMPLICIT  NONE

REAL :: a, b, c ;

  REA :: d ;

  REAL  :: root1, root2 ;

//read in the coefficients a, b and c

  READ(*,*)    a, b, c  

  WRITE(*,*)   'a = ', a

  WRITE(*,*)   'b = ', b

  WRITE(*,*)    'c = ', c

  WRITE(*,*)

// computing the square root of discriminant d

  d = b*b - 4.0*a*c

  IF (d >= 0.0) THEN              //checking if it is solvable?

     d     = SQRT(d)

     root1 = (-b + d)/(2.0*a)     // first root

     root2 = (-b - d)/(2.0*a)     // second root

     WRITE(*,*)  'Roots are ', root1, ' and ', root2

  ELSE                            //complex roots

     WRITE(*,*)  'There is no real roots!'

     WRITE(*,*)  'Discriminant = ', d

  END IF

END PROGRAM  QuadraticEquationSolver

8 0
3 years ago
Match the definition with the corresponding word
Oksana_A [137]

Answer:

Ram is your memory

that's all i know

4 0
3 years ago
Read 2 more answers
Other questions:
  • Codio Challenge Activity PythonWe are passing in a list of numbers. You need to create 2 new lists in your chart, then put all o
    13·1 answer
  • CompX Inc. is an online retailer of electronic products, including laptops and tablets. The company is known for its unique appr
    15·1 answer
  • You are a network security administrator for a bank and you have noticed that an attacker has exploited a flaw in OpenSSL and fo
    9·1 answer
  • Recall that through either photographic or computer technology, researchers can make a composite (or "averaged") face out of any
    11·1 answer
  • A web page ____ can also create a style sheet that takes precedence over the internal style sheets of browsers.
    10·1 answer
  • Gregory Yob is associated with which of these games?
    7·2 answers
  • Answer the question ASAP please
    15·2 answers
  • Think back on the Font Tester App. Can you think of an example of another app or feature of an app which would use a loop to con
    14·1 answer
  • Which format of image files can be inserted in html?​
    8·2 answers
  • ___ is a form of electronic money that is decentralized and whose transactions are encrypted, processed, and recorded via peer-t
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!