Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,195,247 members, 7,957,589 topics. Date: Tuesday, 24 September 2024 at 03:23 PM |
Nairaland Forum / Science/Technology / Programming / Unilorin C Programming Question. (1461 Views)
Learn C++ Programming Language In Few Days / C Programming Help / I Want To Learn C++ Programming Language (2) (3) (4)
Unilorin C Programming Question. by GrAnDwEeZ(m): 8:11am On May 26, 2015 |
In a certain research laboratory, some yttrium-90 has leaked into the computer analysts's coffee room. The leak will presently expose personnel to 80millirems of radiation a day. The half life of the substance is about 5days; I.e the radiation level is only half of what it was five days ago. The analyst wants to know how long it will be before the radiation is down to a safe level of 0.855millirem a day. Write a program in c that will create a chart that displays the radiation level for every five days with the message unsafe or safe accordingly. The chart should stop before the radiation level is one-tenth of the safe level, because the analyst requires a safety factor of 10. The program should prompt the user to enter the initial radiation level.
|
Re: Unilorin C Programming Question. by Ogbeozioma: 10:58am On May 26, 2015 |
Long question, simple question... What do u want us to do with the question? Make we dey praise u say ur school hard? Just joking sha |
Re: Unilorin C Programming Question. by Craigston: 2:26pm On May 26, 2015 |
Brb although I don't know C. This problem is interesting. |
Re: Unilorin C Programming Question. by Nobody: 4:21am On May 29, 2015 |
Its a very simple questions, u just got scared by d size.. _______ - printf("enter initial radiation level" ; float rad, tmprad; int days=0; scanf("%f", &rad); tmprad = rad; //to avoid false positive in the while condition float tok = 0.855 ,safelevel = (1/10) * tok; // one-tenth the safe level while(tmprad > safelevel){ if(tmprad/2 > safelevel)//forward checking { printf("current radiation level is %f, safe level of %f will be achieved in %d days time", tmprad, tmprad/2, days+5); break; } printf("at day %d, radiation level is %f => unsafe!\n", days, tmprad); tmprad = tmprad/2; days += 5; } ----- ____________ 2 Likes |
Re: Unilorin C Programming Question. by olyjosh(m): 8:51pm On May 29, 2015 |
Quite simple, NO BIG DEAL, Stop the hype, its what you have been taught |
Re: Unilorin C Programming Question. by GrAnDwEeZ(m): 9:59pm On May 29, 2015 |
Not trying to hype . Though we've been taught some basics. Buh dis waz kinda tricky... Jez seeking solution here datz all. |
Re: Unilorin C Programming Question. by jacob05(m): 10:11pm On May 29, 2015 |
after working on @mobolaji88 code
3 Likes |
Re: Unilorin C Programming Question. by laykhorn(m): 8:19am On Jun 01, 2015 |
jacob05:I think we have a correct answer! You should allign your code well, its difficult to parse |
(1) (Reply)
168GB Of Free Online Courses From The Best Sites For Programmers [free] / Eliminate Render-blocking Javascript And CSS In Above-the-fold Content / Please Help Me With This Assignment
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 15 |