1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

practice turbo c

Discussion in 'C' started by iheartlds24, Jul 16, 2011.

  1. iheartlds24

    iheartlds24 New Member

    Joined:
    Jul 16, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    pls .. teach me how to use turbo c. . im a comsci student.. this our first lesson..
     
  2. gpk kishore

    gpk kishore New Member

    Joined:
    Jun 30, 2011
    Messages:
    82
    Likes Received:
    0
    Trophy Points:
    0
    hello sir
    turboc is ssimple and easy to use compare to other c compilers
    write a program in the blue screen displayed at the time of opening tc
    save it using f2 option
    and next compile it using alt+f9;
    if your program is error free then you can run your program using ctrl+f9
     
  3. imported_ABHILASH

    imported_ABHILASH New Member

    Joined:
    Jul 29, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    i want one programme
    wap to find gcd of two numbers using function
     
  4. imported_ABHILASH

    imported_ABHILASH New Member

    Joined:
    Jul 29, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    i want one programme
    wap to find gcd of two numbers using function
     
  5. gpk kishore

    gpk kishore New Member

    Joined:
    Jun 30, 2011
    Messages:
    82
    Likes Received:
    0
    Trophy Points:
    0
    Code:
    #include<stdio.h>
    #include<conio.h>
    #include<math.h>
     int Gcd(int,int);
    
    int main(void)
    {
      int a,b,Gcd;
      clrscr();
    
      printf("Enter the two numbers whose GCD is to be found: ");
      scanf("%d%d",&a,&b);
    printf("GCD of %d and %d Using Non-Recursive Function is %d\n",a,b,Gcd(a,b));
    
      getch();
    }
     int Gcd(int p,int q)
    {
     int remainder;
     remainder = p-(p/q*q);
    
     if(remainder==0)
         return q;
     else
         Gcd(q,remainder);
    }
     
  6. NewsBot

    NewsBot New Member

    Joined:
    Dec 2, 2008
    Messages:
    1,267
    Likes Received:
    2
    Trophy Points:
    0
    Please Use Code Blocks when formatting your posts.
     

Share This Page