Pentres 0 Posted May 8, 2019 Report Share Posted May 8, 2019 Olá, tenho este programa abaixo no qual preciso colocar duas XX em cada número que o utilizador escolher e é preciso uma função aleatória podem me ajudar? #include<iostream> #include<cstdio> #include<cstdlib> #include<ctime> #include<algorithm> using namespace std; main() { int i, a; { printf("Quantos numeros pretende apostar?\n"); scanf ("%d",&a); if (a < 6 or a > 49); printf("Deve escolher no minimo de 6 numeros e no maximo 49.\n"); printf("Quantos numeros pretende apostar?\n"); scanf ("%d",&a); if (a < 6 or a > 49); printf("Esta e a sua chave: "); printf("Aposta\n"); for(int i=1; i<=49; i++){ printf("%02d", i); if(i%7==0) printf("\n"); } srand(time(NULL)); int x ; for (x = 0; x < a ; x++) { } return(0); } } Laland Link to post Share on other sites
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now