Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
D

Driganka Mandal

@Driganka Mandal
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Regarding Parameter in C (GCD of 2 Numbers)
    D Driganka Mandal

    So i need to specify that they are integers, right ? :)

    C / C++ / MFC

  • Regarding Parameter in C (GCD of 2 Numbers)
    D Driganka Mandal

    Here is my Program In the line int GCD(num1,num2) I get the warning " warning: parameter names (without types) in function declaration [enabled by default]| " But if I use int GCD(int a,int b) the warning is not there. NOTE - In both cases the program runs perfectly. I am a newbie, so I would appreciate if someone helps me regarding this.... :) /* I am using mingw with code blocks */

    #include<math.h>
    #include<stdio.h>
    #include<conio.h>

    int GCD(num1,num2);
    main()
    {
    int num1,num2;
    printf("\n\tEnter the two numbers whose GCD is to be found : ");
    scanf("%d %d",&num1,&num2);

    printf("\\n\\tGCD of %d & %d is %d",num1,num2,GCD(num1,num2));
    getch();
    

    }
    int GCD(int a ,int b)
    {
    if (b>a)
    return GCD(b,a);
    if(b==0)
    return a;
    else
    return GCD(b,a%b);
    }

    #include<math.h>
    #include<stdio.h>
    #include<conio.h>

    int GCD(num1,num2);
    main()
    {
    int num1,num2;
    printf("\n\tEnter the two numbers whose GCD is to be found : ");
    scanf("%d %d",&num1,&num2);

    printf("\\n\\tGCD of %d & %d is %d",num1,num2,GCD(num1,num2));
    getch();
    

    }
    int GCD(int a ,int b)
    {
    if (b>a)
    return GCD(b,a);
    if(b==0)
    return a;
    else
    return GCD(b,a%b);
    }

    #include<math.h>
    #include<stdio.h>
    #include<conio.h>

    int GCD(num1,num2);
    main()
    {
    int num1,num2;
    printf("\n\tEnter the two numbers whose GCD is to be found : ");
    scanf("%d %d",&num1,&num2);

    printf("\\n\\tGCD of %d & %d is %d",num1,num2,GCD(num1,num2));
    getch();
    

    }
    int GCD(int a ,int b)
    {
    if (b>a)
    return GCD(b,a);
    if(b==0)
    return a;
    else
    return GCD(b,a%b);
    }

    C / C++ / MFC
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups