Thread: Hepl again!!

  1. #1
    Registered User
    Join Date
    Jan 2012

    Exclamation Hepl again!!

    I have some problem with a project that wants to find the three bigger numbers in a table of ten numbers.I find the biggest number but i can't think the logical function to find the other two.
    i wrote this code
    for (i = 0; i < LIM; i++)
    cout<<table[i]<<" ";
    max = table[0];
    for (i = 0; i < LIM; i++n)
    if (table[i] > max)
    max = table[i];
    for (i = 0; i < LIM; i++)
    for (i = 0; i < LIM; i++)
    cout << endl<<endl;

    but is definitely wrong :0
    Thanks in advance!!!
    Last edited by Jay Ret; 01-10-2012 at 11:56 AM.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    Well what is missing are all the braces you've removed from your code in order to avoid you having to use [code][/code] tags.

    A novel approach to be sure, but utterly useless in conveying what your code actually does.
    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.

  3. #3
    Registered User
    Join Date
    Jan 2012
    You mean that i have done a synax error??I think that all the fuction is wrong.

  4. #4
    Join Date
    Oct 2007
    It means that you post your real code and use code tags.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can anybody hepl?
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 04-02-2002, 09:02 AM