Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
~1K People Reached
Favorite Forums
Favorite Tags
c x 40
scanf x 21
Member Avatar for mariosbikos

[CODE]int sin2(int g) { static int metritis1=1,i=0; int l,c,pin[100],pin2[100]; char result; srand ( time(NULL) ); l = rand() % 10; c = rand() % 10; c=65+c; l=l+1; pin[g]=c; pin2[g]=l; printf("%d and %d the g is %d\n",pin[g],pin2[g],g); while (1){ if (pin[i]==pin[g] && pin2[i]==pin2[g]){ printf("%c kai %d g is %d to i …

Member Avatar for mariosbikos
0
104
Member Avatar for mariosbikos

[CODE]#include <stdlib.h> #include <stdio.h> #include <time.h> #define MAX_ROWS 10 #define MAX_COLS 10 static char map[10][10]; void sin1(char map[][MAX_COLS]); void sin2(void); void sin3(char map[][MAX_COLS]); int main(void) { system("chcp 1253 >nul "); FILE *fileptr; char myColchar,apantisi,map[MAX_ROWS][MAX_COLS]; int metritis1=0,apotelesma,myColnum=1,myrow=1,k,a,l,c,row, col; char r,fileRow[MAX_COLS + 2]; // account for newline and NULL printf("dose tin diataksi …

Member Avatar for mariosbikos
0
257
Member Avatar for mariosbikos

hi i want to know how exactly can i use time.h and rand() if i want to print every time a pair of numbers but the same pair will be printed only once for example: 2 2 2 3 1 4 3 5 2 2<----- not to happen(instead get a …

Member Avatar for Adak
0
99
Member Avatar for mariosbikos

[CODE]#include <stdlib.h> #include <stdio.h> #include <time.h> #define MAX_ROWS 10 #define MAX_COLS 10 void sin1(char *map); int main(void) { system("chcp 1253 >nul "); FILE *fileptr; char myColchar,apantisi,map[MAX_ROWS][MAX_COLS]; int apotelesma,myColnum=1,myrow=1,k,a,l,c,row, col; char r,fileRow[MAX_COLS + 2]; // account for newline and NULL printf("dose tin diataksi me ton arithmo pou epithymeis(1/2): \n"); scanf("%d",&k);//edo tha …

Member Avatar for mariosbikos
0
266
Member Avatar for mariosbikos

hi guys i have an urgent problem....we have been asked to make a battleship game in C which will have the formation of ships taken by a file txt.....for example 00000000 ppp00000 0000nnnn 00000000 etc...i want to open the file txt and then put every single character 0,p,n etc to …

Member Avatar for mariosbikos
0
283