GOLF - #include # #include struct deck...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
#include<iostream.h> #include<conio.h> # struct deck { int data[6]; int top; }; } struct single { int data; int top; }; } struct card { struct deck d[8]; struct single s[4]; }; } int cond[13][2]; int m; int checkcond1(int x); int checkcond1(int x,int y); int checkcond1(int x,int y,int z); i void read(struct card *q,int *arr) { int i,j,k,x; for(i=1;i<=8;i++) { cout<<"Enter the data in "<<i<<" column"; for(j=0;j<6;j++) { cin>>x; q->d[i-1].data[j]=x; (arr[x])++; } q->d[i].top=0; } while(i<=12) { cout<<"Enter the data in "<<(i)<<" column"; cin>>x; q->s[i-9].data=x; (arr[x])++; q->s[1-8].top=0; i++; } } int check(int *arr) { int i=1; while(i<13)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
{ if(arr[i]==arr[i+1]) { i++; } else { if(arr[i+1]!=4) { cout<<"WRONG AT "<<i+1; return 0; } else { cout<<"WRONG AT "<<i; return 0; } } } return 1; } void display(struct card *q) { int i,j,k; clrscr(); cout<<"\n"; for(k=1;k<=2;k++) { for(i=5;i>=0;i--) { for(j=(4*(k-1));j<(4*k);j++) { cout<<"\t"<<q->d[j].data[i]; } cout<<"\n"; } cout<<"\n\n"; } for(k=0;k<4;k++)
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/25/2010 for the course CMPN SEM1 taught by Professor Thakur during the Spring '06 term at University of Mumbai.

Page1 / 5

GOLF - #include # #include struct deck...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online