//Stephen Igbinedion
//CMPS 1043
//November 10
//This program plays multiple games of Simple Simon Bridge

#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>

using namespace std;
ifstream infile;
ofstream outfile;

void Hand(char c1,char c2,char c3,char c4,char c5);
int  winner(int R_bid, int W_bid,int I_bid);

int main()
{
    int optimus;
    char gameplayer, c1,c2,c3,c4,c5;
    int R_bid, W_bid, I_bid;
    int c1_bid=0, c2_bid=0, c3_bid=0, c4_bid=0, c5_bid=0, Hand_bid;

    infile.open("input.txt");
    outfile.open("output.txt");
    outfile<<"Simple Simon Bridge Game 5:"<<endl;
    infile>>optimus;
    {
        infile>>gameplayer>>c1>>c2>>c3>>c4>>c5;

        outfile<<gameplayer<<"   "<<c1<<"   "<<c1_bid;

                    outfile<<"   "<<c2<<"   "<<c2_bid;

                    outfile<<"   "<<c3<<"   "<<c3_bid;

                    outfile<<"   "<<c4<<"   "<<c4_bid;

                    outfile<<"   "<<c5<<"   "<<c5_bid;

                    outfile<<"   bid:   "<<Hand_bid<<endl;


        Hand_bid = c1_bid + c2_bid + c3_bid + c4_bid + c5_bid;




    }
    return 0;
}


int main()
{   
    int R_bid, W_bid, I_bid;
    int c1_bid, c2_bid, c3_bid, c4_bid, c5_bid;
    char gameplayer;

    switch (c1)
    {

         case 'A': c1_bid = 11;
             break;

         case 'K': c1_bid = 7;
             break;

         case 'Q': c1_bid = 5;
             break;

         case 'J': c1_bid = 3;
             break;

         case 'T': c1_bid = 1;
             break;
    }

    switch (c2)
    {
         case 'A': c2_bid = 11;
             break;
         case 'K': c2_bid = 7;
             break;

         case 'Q': c2_bid = 5;
             break;

         case 'J': c2_bid = 3;
             break;

         case 'T': c2_bid = 1;
             break;
    }

    switch (c3)
    {
         case 'A': c3_bid = 11;
             break;
         case 'K': c3_bid = 7;
             break;

         case 'Q': c3_bid = 5;
             break;

         case 'J': c3_bid = 3;
             break;

         case 'T': c3_bid = 1;
             break;
    }

    switch (c4)
    {
         case 'A': c4_bid = 11;
             break;
         case 'K': c4_bid = 7;
             break;

         case 'Q': c4_bid = 5;
             break;

         case 'J': c4_bid = 3;
             break;

         case 'T': c4_bid = 1;
             break;
    }

    switch (c5)
    {
         case 'A': c5_bid = 11;
             break;
         case 'K': c5_bid = 7;
             break;

         case 'Q': c5_bid = 5;
             break;

         case 'J': c5_bid = 3;
             break;

         case 'T': c5_bid = 1;
             break;
    }
         int winner(int R_bid, int W_bid, int I_bid);
         {
             char winner;

             if (R_bid >> W_bid && I_bid)
                 winner = 'R';
             else if(W_bid >> R_bid && I_bid)
                 winner = 'W';
             else if(I_bid >> W_bid && R_bid)  
                 winner = 'I';

         }
}

Kindly put your code in code tags..because I for one can not read your code..

"Show me your code and I will tell you who you are.."-Tkud

Whats your problem?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.