Preview:
#include<stdio.h>


float check_number(float num1, float num2)
{
    int answer;
    if(num1 >= 0 && num2 >= 0)
    {
        answer = 1;
    }
    else
    {
        answer = 0;
    }
    return answer;
}
void main()
{
    float num1, num2, answer;
    printf("enter number 1: ");
    scanf("%f", &num1);
    printf("enter number 2: ");
    scanf("%f", &num2);

    answer = check_number(num1, num2);

    if(answer == 1)
    {
        printf("two number the same sign");
    }
    else
    {
        printf("two number different sign");
    }

}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter