#include <stdio.h>
#include <stdlib.h>
#define N 20
int main()
{
system("color 2f");
// use malloc for avoiding error of system
char *data = malloc(sizeof(char));
int i;
for(i=0;i<N;i++){
data[i] = getchar();
}
int k;
for(k=0;k<N;k++){
putchar(data[k]);
}
return 0;
}
#include <stdlib.h>
#define N 20
int main()
{
system("color 2f");
// use malloc for avoiding error of system
char *data = malloc(sizeof(char));
int i;
for(i=0;i<N;i++){
data[i] = getchar();
}
int k;
for(k=0;k<N;k++){
putchar(data[k]);
}
return 0;
}
works but crashes when it ends
ReplyDelete