Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<conio.h>
- void main (int xa, int xb, int ya, int yb,int xmin,int xmax, int ymin, int ymax,int Aa, int Ba, int Ra,int La, int Ab, int Bb, int Rb, int Lb)
- {
- int A,B,R,L;
- printf("Enter the number of xa points :");
- scanf("%d",&xa);
- printf("Enter the number of xb points :");
- scanf("%d",&xb);
- printf("Enter the number of ya points :");
- scanf("%d",&ya);
- printf("Enter the number of yb points :");
- scanf("%d",&yb);
- printf("Enter the number of xmin points :");
- scanf("%d",&xmin);
- printf("Enter the number of xmax points:");
- scanf("%d",&xmax);
- printf("Enter the number of ymin points:");
- scanf("%d",&ymin);
- printf("Enter the number of ymax points:");
- scanf("%d",&ymax);
- if (ya>ymax)
- {
- Aa=1;}
- else{
- Aa=0;
- }
- if (ya<ymin)
- {
- Ba=1;}
- else{
- Ba=0;
- }
- if(xa>xmax)
- {
- Ra=1;
- }
- else{
- Ra=0;
- }
- if(xa <xmin)
- {
- La=1;}
- else{
- La=0;
- }
- if (yb>ymax)
- {
- Ab=1;}
- else{
- Ab=0;
- }
- if (yb<ymin)
- {
- Bb=1;}
- else{
- Bb=0;
- }
- if(xb>xmax)
- {
- Rb=1;
- }
- else{
- Rb=0;
- }
- if(xb <xmin)
- {
- Lb=1;}
- else{
- Lb=0;
- }
- if (Aa==1&& Ab==1)
- {
- A=1;}
- else{
- A=0;
- }
- if (Ba==1&& Bb==1)
- {
- B=1;}
- else{
- B=0;
- }
- if (Ra==1&& Rb==1)
- {
- R=1;
- }
- else{
- R=0;
- }
- if (La==1&& Lb==1)
- {
- L=1;}
- else{
- L=0;
- }
- printf("%d%d%d%d",A,B,R,L);
- if (Aa==0&& Ba==0&& Ra==0&& La==0 && Ab==0&& Bb==0&& Rb==0&&Lb==0){
- printf("Trivally Acctepted");
- }
- else if (A==0 && B==0&& Ra==0 && L==0)
- {
- printf ("Partially Acctepted");
- }
- else {
- printf (" Trivally Rejected");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement