Hur gör jag för att få 5 stryktipsrader ?   Hej För att öka läsbarheten... :-)Hur gör jag???
    
    
#include <iostream.h>
#include <time.h>
#include <stdlib.h>
#include <iomanip.h>
void main () 
{
	int tal ; 
	srand (time(0));
for ( int j= 1; j <=13; j++ )
	
	{
for ( int i = 1; i <= 5; i++) 
		tal = rand () %3+1;	
{
	switch (tal) 
	{
		case 1: 
			cout <<"1       " ; 
			break;
		case 2:
			cout <<"  X     "; 
			break;
		case 3:
			cout <<"    2   ";
			break; 
	}
}
}
}Sv: Hur gör jag???
    
    
Jag gjorde några småändringar och nu tror jag det fungerar lite bättre.
<code>
#include <iostream.h>
#include <time.h>
#include <stdlib.h>
#include <iomanip.h>
void main ()
{
	int tal;
	srand (time(0));
	for ( int j= 1; j <=13; j++ )
	{
		for ( int i = 1; i <= 5; i++)
		{
			tal = rand () %3+1;
			switch (tal)
			{
				case 1:
					cout <<"1       ";
					break;
				case 2:
					cout <<"  X     ";
					break;
				case 3:
					cout <<"    2   ";
					break;
			}
		}
		cout << endl;
	}
}
</code>
// PetterSv: Hur gör jag???
    
    
<code>
#include <iostream.h> 
#include <time.h> 
#include <stdlib.h> 
#include <iomanip.h> 
void main () 
{ 
    int tal; 
    srand (time(0)); 
    for ( int j= 1; j <=13; j++ ) 
    { 
        for ( int i = 1; i <= 5; i++) 
        { 
            tal = rand () %3+1; 
            switch (tal) 
            { 
                case 1: 
                    cout <<"1    |"; 
                    break; 
                case 2: 
                    cout <<"  X  |"; 
                    break; 
                case 3: 
                    cout <<"    2|"; 
                    break; 
            } 
        } 
        cout << endl;
    }
    cout << endl;
}
</code>
/Håkan