functions in c

Discussion in 'C' started by roi_908, Nov 4, 2011.

  1. roi_908

    roi_908 New Member

    Joined:
    Nov 4, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    hi guys....my name is roi and i am a beginner in c...and i really need some help to all of you...
    my teacher have told me to select a game for turbo c and i selected a piano game...i have to write the meaning of all functions in the code...
    This is the code:
    Code:
    #include<conio.h>
    #include<dos.h>
    #include<fstream.h>
    
    void jain(int a)
    {
    sound((a*8)/2);
    delay(300);
    nosound();
    }
    
    void main(int argc,char *argv[])
    {
    char anuj;
    fstream file1;
    file1.open(argv[1],ios::out);
    clrscr();
    cout<<"PIANO "<<"
    
    
    Press `q' to exit.
    ";
    while(anuj!='q')
    {
    jain(anuj);
    anuj=getch();
    if(anuj!='q')
    file1.put(anuj);
    }
    file1.close();
    }
     
  2. NewsBot

    NewsBot New Member

    Joined:
    Dec 2, 2008
    Messages:
    1,267
    Likes Received:
    2
    Trophy Points:
    0
    Moved to C Programming Forum
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice