Question:
Please help me with programming homework?
2014-05-30 09:24:49 UTC
Please help me with programming homework. I did most of the work right and have now two questions that must be done too:

1. A floating point number which is stored in binary form has three distinct parts. Which are they and what do they represent?

2. A loop which is not infinite always contains three important elements. Which?


//Tokaj
Four answers:
?
2014-05-30 09:58:32 UTC
For question 1: the sign, the exponent, and the fraction. Or...

fraction, exponent, and radix



You'll have to consider the context of your lecture to determine which answer your instructor might be looking for.



(Source: http://www3.ntu.edu.sg/home/ehchua/programming/java/DataRepresentation.html)



For question 2, I can think of only two important elements: and entry point, and an exit point. In the case of a for loop, a "step" element may be necessary, but not important.



Or, and interrupt in the loop might be considered important. For instance, you're looping thru a 100 element array looking for one particular set of data. Once you find the data, you no long need to finish the loop.



Hope this helps.
2014-05-30 09:45:50 UTC
For the loops I think it is

if while

while

do while

I hope this helps im a beginner too .i recommend this book "jumping into c++" by Alex...forgot last name!but all the c programming is very similar but if your interested in web development I recommend w3schools.com or codecademy...hope this helps and good luck on your c programming!!!
?
2014-06-01 07:52:11 UTC
1. Sign, Exponent, Mantissa
?
2014-05-30 10:28:19 UTC
I believe what you're groping for on the second question is the loop entry point (keyword that sets up a loop with the boolean test usually, though test may be separate or delayed as in do - while or do - until structures and any needed preconditions), the exit conditional (boolean statement that checks a condition once per iteration to see if the objective is achieved) and the code statement that acts on the conditional inside the loop to increment a number, reset a boolean value or whatever is needed to flag the change for the conditional test.



I hope this will help you out. Good luck!


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...