🔒 Closed C language

Status
Not open for further replies.

zacha

Forum Veteran
1652976532393.webp
1652976558736.webp
 
Ahh ok,
pag positive yung X at positive yung Y = Q1
pag negative x at positive Y = Q2
pag both negative, Q3
pag positive X at negative Y = Q4

pag maski X or Y ay zero = Quadrantal

C:
#include <stdio.h>

main()
{
    float X, Y;

    printf("Enter value of x-coordinate: : ");
    scanf_s("%f", &X);
    printf("Enter value of y-coordinate: : ");
    scanf_s("%f", &Y);
    
    char open = '(', close = ')';

    printf("Point %c%.2f, %.2f%c ", open, X, Y,close);

    if ((X == 0) || (Y == 0))
    {
        printf("is Quadrantal");
    }
    else if ((X > 0) && (Y > 0))
    {
        printf("lies in Quadrant I");
    }
    else if ((X < 0) && (Y > 0))
    {
        printf("lies in Quadrant II");
    }
    else if ((X < 0) && (Y < 0))
    {
        printf("lies in Quadrant III");
    }
    else if ((X > 0) && (Y < 0))
    {
        printf("lies in Quadrant IV");
    }


    getch();
    getch();
}
 
Ahh ok,
pag positive yung X at positive yung Y = Q1
pag negative x at positive Y = Q2
pag both negative, Q3
pag positive X at negative Y = Q4

pag maski X or Y ay zero = Quadrantal

C:
#include <stdio.h>

main()
{
    float X, Y;

    printf("Enter value of x-coordinate: : ");
    scanf_s("%f", &X);
    printf("Enter value of y-coordinate: : ");
    scanf_s("%f", &Y);
   
    char open = '(', close = ')';

    printf("Point %c%.2f, %.2f%c ", open, X, Y,close);

    if ((X == 0) || (Y == 0))
    {
        printf("is Quadrantal");
    }
    else if ((X > 0) && (Y > 0))
    {
        printf("lies in Quadrant I");
    }
    else if ((X < 0) && (Y > 0))
    {
        printf("lies in Quadrant II");
    }
    else if ((X < 0) && (Y < 0))
    {
        printf("lies in Quadrant III");
    }
    else if ((X > 0) && (Y < 0))
    {
        printf("lies in Quadrant IV");
    }


    getch();
    getch();
}
Salamattt!!
 
pap
Ahh ok,
pag positive yung X at positive yung Y = Q1
pag negative x at positive Y = Q2
pag both negative, Q3
pag positive X at negative Y = Q4

pag maski X or Y ay zero = Quadrantal

C:
#include <stdio.h>

main()
{
    float X, Y;

    printf("Enter value of x-coordinate: : ");
    scanf_s("%f", &X);
    printf("Enter value of y-coordinate: : ");
    scanf_s("%f", &Y);
   
    char open = '(', close = ')';

    printf("Point %c%.2f, %.2f%c ", open, X, Y,close);

    if ((X == 0) || (Y == 0))
    {
        printf("is Quadrantal");
    }
    else if ((X > 0) && (Y > 0))
    {
        printf("lies in Quadrant I");
    }
    else if ((X < 0) && (Y > 0))
    {
        printf("lies in Quadrant II");
    }
    else if ((X < 0) && (Y < 0))
    {
        printf("lies in Quadrant III");
    }
    else if ((X > 0) && (Y < 0))
    {
        printf("lies in Quadrant IV");
    }


    getch();
    getch();
}
paps pwede pa sagot sa post ko hahhaa
kapalan ko na muka ko paps hahahha
 
naka post na ako paps kanina hehe

mali siguro channel ko na post

na move ko na sa prog and coding paps hehe
 
Status
Not open for further replies.

About this Thread

  • 5
    Replies
  • 570
    Views
  • 2
    Participants
Last reply from:
zacha

Online now

Members online
425
Guests online
1,302
Total visitors
1,727

Forum statistics

Threads
2,277,856
Posts
28,979,305
Members
1,229,115
Latest member
zxckeen
Back
Top