help needed

This is a discussion on help needed within the C++ Programming forums, part of the General Programming Boards category; ahh help my borland stopped working and i need to know what the output is. i think i know what ...

  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    12

    help needed

    ahh help my borland stopped working and i need to know what the output is. i think i know what it is just by working it out on paper but i cant be sure as im sorta new to borland..

    help me please


    Code:
    #include<conio.h>
    #include<stdio.h> 
    
    int funct 1 ( int count 1 ); 
    
    int main() 
       {
       int a, count1; 
       clrscr(); 
       for ( count 1 = count 1 <= 4; count ++ ) 
            { 
            a=funct1 (count1);
            printf ( " %4d", a); 
            } 
    
    getch(); 
    return(0); 
       }
    
    
    
    int funct1 (int x) 
       {
    int y;
    y=2*x; 
    retum(y) ;
    }
    Last edited by idiotprogrammer; 06-17-2003 at 05:10 AM.

  2. #2
    Registered User
    Join Date
    May 2003
    Posts
    148
    Not really funny.
    Code:
    #include<conio.h>
    #include<stdio.h> 
    
    int funct1 (int); 
    
    int main() 
    {
    	int a, count1; 
    	clrscr(); 
    	for (count1 = 0;count1 <= 4; count1++ ) 
    	{ 
    		a=funct1 (count1);
    		printf ( " %4d", a); 
    	} 
    
    	getch(); 
    	return(0); //return not retum,and 0 not O
    }
    
    int funct1 (int x) 
    {
    	int y;
    	y=2*x; 
    	return(y);
    }

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    12

    Thumbs down

    err funny..yeah im funny without even knowing it

    ever heard of a typo...

    does someone wanna chuck it in borland and check what the outpue result it please

  4. #4
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    The output should be (executing it in my head)
    Code:
        2    4    6    8
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  5. #5
    Registered User
    Join Date
    Mar 2003
    Posts
    12
    thanx thought so

    cheers mate

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. free needed or not?
    By quantt in forum Linux Programming
    Replies: 3
    Last Post: 06-25-2009, 10:32 AM
  2. C Programmers needed for Direct Hire positions
    By canefan in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 09-24-2008, 12:55 PM
  3. lock needed in this scenario?
    By George2 in forum C# Programming
    Replies: 1
    Last Post: 05-25-2008, 08:22 AM
  4. C++ help needed
    By Enkindu in forum Projects and Job Recruitment
    Replies: 3
    Last Post: 09-01-2004, 12:24 AM
  5. semi-colon - where is it needed
    By kes103 in forum C++ Programming
    Replies: 8
    Last Post: 09-12-2003, 06:24 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21