ok, i see what you mean.. now my program works
Code:
#include<iostream.h>
#include<fstream.h>
int main()
{
double c, h, s, d, i, r;
i=1;
r=0;
while(r<52)
{
r=r+1;
cout<<endl<<r<<". ";
i=r;
i=i+5;
c=i/4;
i = c - (int)c;
if( i > 0.0 )
c = 0.0;
if(c>13)
c=c-13;
if(c!=0)
cout<<"C: "<<c;
i=r;
i=i+10;
h=i/4;
i = h - (int)h;
if( i > 0.0 )
h = 0.0;
if(h>13)
h=h-13;
if(h!=0)
cout<<"H: "<<h;
i=r;
i=i+15;
s=i/4;
i = s - (int)s;
if( i > 0.0 )
s = 0.0;
if(s>13)
s=s-13;
if(s!=0)
cout<<"S: "<<s;
i=r;
i=i+0;
d=i/4;
i = d - (int)d;
if( i > 0.0 )
d = 0.0;
if(d>13)
d=d-13;
if(d!=0)
cout<<"D: "<<d;
}
return 0;
}
but no i have a new problem! The program is made to repeat its self 52 times so when i see the output all i can see is the last 20 or so outputs...
and incase you are wondering this program is to caculate the order of a deck of cards so: c=clubs, s=spades, h=hearts, d=dimonds. also since there are 52 cards in a deck, the caculaton needs to be run 52 times.
if you see any thing in my code that shouldnt be there, please tell me. thanks
-KJ Magic