![]() |
sponsored links |
|
|
sponsored links
|
|
1
21st May 05:38
External User
Posts: 1
|
Hi
sorry to bother you all with this but im currently at college beginning to learn C. I have a question ive been given which i need to code and answer but i just dont understand what it wants or how to do it. could someone please help out? heres the question in full: 1. Read three single digit characters from the keyboard and convert them into their numerical equivalent values (Hint: use getchar(), subtract character zero from the digit character to convert it to its numerical value.) The program should test the digits and a) print an appropriate message if the digits are identical b) the average of the three digits c) the minimum of the three digits d) the maximum of the three digits e) the percentage value of the smaller number with respect to the larger. Thanx Keith -- comp.lang.c.moderated - moderation address: clcm@plethora.net |
|
|
|
2
21st May 05:38
External User
Posts: 1
|
The problem assignment you included explains how to input
and convert the characters, and the required outputs are clearly specified and trivial to compute for anybody who meets normal college entrance requirements. Between your textbook and your instructor you should have all the help you need; this (or any other) newsgroup is not suitable for help with schoolwork. If you have used those resources and are still lost, then you need to reexamine what your purpose is in "learning C", because this is the *easy* stuff; it gets much more challenging. -- comp.lang.c.moderated - moderation address: clcm@plethora.net |
|
|
3
21st May 05:38
External User
Posts: 1
|
Hi,
On 25 Nov 2003 04:33:51 GMT, Keith__ said: This has nothing to do to C, and there is a tradition of not doing homework problems (or giving solutions which would leave your teacher in no doubt that it wasn't you who came up with them). I imagine that your teacher wants you to do a problem which does the following: dave$ ./homework 3 4 8 Digits are not identical. Average: 5.0 Minimum: 3 Maximum: 8 Percentage value of min wrt max: 37.5% dave$ Or something like that. Hope this helps, Dave. -- David Neary, E-Mail: bolsh at gimp dot org Work e-mail: d dot neary at phenix dot fr CV: http://www.redbrick.dcu.ie/~bolsh/CV/CV.html -- comp.lang.c.moderated - moderation address: clcm@plethora.net |
|
|
4
1st June 00:23
External User
Posts: 1
|
In article <clcm-20031124-0005@plethora.net>, Keith__
<asdth@hotmail.com> writes If you really do not understand the question you should be consulting your instructor and/or rereading your textbook/course notes. As far as I can see your question has nothing to do with C because once you understand what is being asked writing the C code is just a matter of whether you have learnt enough C to express the solution in terms of C. -- Francis Glassborow ACCU If you are not using up-to-date virus protection you should not be reading this. Viruses do not just hurt the infected but the whole community. -- comp.lang.c.moderated - moderation address: clcm@plethora.net |
|
|
5
1st June 00:24
External User
Posts: 1
|
In article <clcm-20031124-0005@plethora.net>, Keith__
<asdth@hotmail.com> writes If you really do not understand the question you should be consulting your instructor and/or rereading your textbook/course notes. As far as I can see your question has nothing to do with C because once you understand what is being asked writing the C code is just a matter of whether you have learnt enough C to express the solution in terms of C. -- Francis Glassborow ACCU If you are not using up-to-date virus protection you should not be reading this. Viruses do not just hurt the infected but the whole community. -- comp.lang.c.moderated - moderation address: clcm@plethora.net |
|