mirror of
https://github.com/eddyem/eddys_snippets.git
synced 2026-03-21 17:20:57 +03:00
add two avx instructions example & simple clear screen
This commit is contained in:
21
clr.c
Normal file
21
clr.c
Normal file
@@ -0,0 +1,21 @@
|
||||
// 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;
|
||||
}
|
||||
Reference in New Issue
Block a user