Thread: Help me solve this programming question please......

  1. #1
    Registered User
    Join Date
    Jul 2012
    Posts
    1

    Help me solve this programming question please......

    (Global Warming Facts Quiz) The controversial issue of global warming has been widely publicized by the film An Inconvenient Truth, featuring former Vice President Al Gore. Mr. Gore and a U.N. network of scientists, the Intergovernmental Panel on Climate Change, shared the 2007 Nobel Peace Prize in recognition of “their efforts to build up and disseminate greater knowledge about man-made climate change.” Research both sides of the global warming issue online (you might want to search for phrases like “global warming skeptics”). Create a five-question multiple-choice quiz on global warming, each question having four possible answers (numbered 1–4). Be ob-jective and try to fairly repre sent both sides of the issue. Next, write an application that administers the quiz, calculates the number of correct answers (zero through five) and returns a message to the user. If the user correctly answers five questions, print “Excellent”; if four, print “Very good”; if three or fewer, print “Time to brush up on your knowledge of global warming,” and include a list of some of the websites where you found your facts.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    You presumably have done the first part on creating the quiz question and answers. So, what have you done for the second part that you need help with?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Cross-posted spam
    Help Me Solve This Programming Question Please...... - Dev Shed

    More like just a bunch of keywords for spam fodder.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    Heh, looks like another sighting of a manbearpig.
    1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
    2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
    3. Get rid of conio.h and other antiquated DOS crap headers.
    4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help me solve dis question..Please
    By imbax in forum C Programming
    Replies: 2
    Last Post: 09-23-2010, 09:25 PM
  2. how to solve this question?
    By zcrself in forum C Programming
    Replies: 9
    Last Post: 03-10-2010, 12:12 AM
  3. C bufferoverflow question. can anyone solve it?
    By asdfgh in forum Linux Programming
    Replies: 2
    Last Post: 11-03-2009, 01:40 PM
  4. Help me solve this programming error please
    By rushhour in forum C++ Programming
    Replies: 20
    Last Post: 01-03-2009, 02:11 PM
  5. a question that i can't solve
    By revolution3396 in forum C Programming
    Replies: 16
    Last Post: 11-19-2008, 06:36 PM

Tags for this Thread