mirror of
https://github.com/eddyem/eddys_snippets.git
synced 2025-12-06 02:35:12 +03:00
22 lines
386 B
C
22 lines
386 B
C
// make a simple "CLS"
|
|
|
|
#include <stdio.h>
|
|
#include <unistd.h>
|
|
|
|
void printstrings(const char *add){
|
|
for(int i = 0; i < 40; ++i)
|
|
printf("String %d - %s\n", i, add);
|
|
}
|
|
|
|
const char *x[] = {"first", "second", "third"};
|
|
|
|
int main(){
|
|
for(int i = 0; i < 3; ++i){
|
|
printf("\033c");
|
|
printstrings(x[i]);
|
|
sleep(1);
|
|
}
|
|
printf("\033c");
|
|
return 0;
|
|
}
|