This commit is contained in:
2025-02-03 08:38:52 +03:00
parent 7522af1dc2
commit bb35fb2db6
7 changed files with 41 additions and 0 deletions

BIN
test/a.out Normal file

Binary file not shown.

6
test/alert.c Normal file
View File

@ -0,0 +1,6 @@
#include <stdio.h>
int main(void) {
printf("Alert!\a");
return 0;
}

24
test/test1.c Normal file
View File

@ -0,0 +1,24 @@
#include <stdio.h>
int main(void){
int num;
int e = 1;
int decimal = 0;
printf("%s\n", "Enter UNSIGNED BINARY! to convert decimal");
scanf("%d", &num);
int temp = num;
while (temp) {
int last = temp % 10;
temp = temp / 10;
decimal += last * e;
e = e * 2;
}
printf("%s %d\n", "Decimal: ", decimal);
return 0;
}

13
test/test2.c Normal file
View File

@ -0,0 +1,13 @@
#include <stdio.h>
int main() {
int n = 4, a = 1;
int i, c;
for (i = 1; i <=n; i++) {
for (c = 1; c <= i; c++) {
printf("%d", a);
a++;
}
printf("\n");
}
}