new file: proglabs/lab5/.1.c.swo
new file: proglabs/lab5/.1.c.swp new file: proglabs/lab5/1 modified: proglabs/lab5/1.c new file: proglabs/lab5/1.c~ new file: proglabs/lab5/10 new file: proglabs/lab5/11 new file: proglabs/lab5/12 new file: proglabs/lab5/13 new file: proglabs/lab5/14 new file: proglabs/lab5/15 modified: proglabs/lab5/15.c new file: proglabs/lab5/15.c~ new file: proglabs/lab5/16 new file: proglabs/lab5/17 new file: proglabs/lab5/18 new file: proglabs/lab5/2 new file: proglabs/lab5/3-1 new file: proglabs/lab5/3-2 new file: proglabs/lab5/4 new file: proglabs/lab5/5 modified: proglabs/lab5/5.c new file: proglabs/lab5/5.c~ new file: proglabs/lab5/6 new file: proglabs/lab5/7 new file: proglabs/lab5/8 new file: proglabs/lab5/9 deleted: proglabs/lab5/<F5> new file: proglabs/lab5/a.out modified: proglabs/lab5/tmp.out
This commit is contained in:
Binary file not shown.
Binary file not shown.
Executable
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void) {
|
||||
int main() {
|
||||
char l[26];
|
||||
|
||||
for (int i = 0; i < 26; ++i) {
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void) {
|
||||
char l[26];
|
||||
|
||||
for (int i = 0; i < 26; ++i) {
|
||||
l[i] = 'a' + i;
|
||||
}
|
||||
printf("t-t: ");
|
||||
for (int i = 0; i < 26; ++i) {
|
||||
printf("%c ", l[i]);
|
||||
}
|
||||
printf("\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
+8
-4
@@ -1,19 +1,23 @@
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
#include <locale.h>
|
||||
|
||||
int main() {
|
||||
char c, s[256];
|
||||
setlocale(LC_ALL, "");
|
||||
wchar_t s[256];
|
||||
wchar_t c;
|
||||
int n = 0, st = 0;
|
||||
|
||||
while(st == 0){
|
||||
scanf("%c", &c);
|
||||
wscanf(L"%lc", &c);
|
||||
st = (c == '\n');
|
||||
s[n] = c * (1 - st);
|
||||
s[n] = c;
|
||||
n = n + (1 - st);
|
||||
}
|
||||
|
||||
while(n > 0) {
|
||||
n -= 1;
|
||||
printf("%c", s[n]);
|
||||
wprintf(L"%lc", s[n]);
|
||||
}
|
||||
printf("\n");
|
||||
return 0;
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
#include <locale.h>
|
||||
|
||||
int main() {
|
||||
setlocale(LC_ALL, "");
|
||||
wchar_t s[256];
|
||||
wchar_t c;
|
||||
int n = 0, st = 0;
|
||||
|
||||
printf("write: ");
|
||||
while(st == 0){
|
||||
wscanf(L"%lc", &c);
|
||||
st = (c == '\n');
|
||||
s[n] = c;
|
||||
n = n + (1 - st);
|
||||
}
|
||||
|
||||
while(n > 0) {
|
||||
n -= 1;
|
||||
wprintf(L"%lc", s[n]);
|
||||
}
|
||||
printf("\n");
|
||||
return 0;
|
||||
}
|
||||
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
+6
-2
@@ -1,8 +1,12 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(){
|
||||
int r = 5;
|
||||
char l;
|
||||
int r = 0;
|
||||
char l, x;
|
||||
scanf("%c", &x);
|
||||
|
||||
for(char z = 'A'; z <= x; ++z)
|
||||
r++;
|
||||
for(int i = 1; i <= r; ++i){
|
||||
l = 'A';
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(){
|
||||
int r = 1;
|
||||
char l, x;
|
||||
scanf("%c", &x);
|
||||
|
||||
for(char z = 'A'; z <= x; ++z)
|
||||
r++;
|
||||
for(int i = 1; i <= r; ++i){
|
||||
l = 'A';
|
||||
|
||||
for(int j = 0; j < r - i; ++j){
|
||||
printf(" ");
|
||||
}
|
||||
|
||||
for(int j = 0; j < i; ++j){
|
||||
printf("%c", l);
|
||||
l++;
|
||||
}
|
||||
l -= 2;
|
||||
for(int j = 0; j < i - 1; ++j){
|
||||
printf("%c", l);
|
||||
l--;
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
@@ -1,13 +0,0 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
int n[8];
|
||||
for (int i = 0; i < 8; i++){
|
||||
printf("num %d: ",i);
|
||||
scanf("%d", &n[i]);
|
||||
}
|
||||
for (int i = 8; i >= 0; --i)
|
||||
printf("%d ", n[i]);
|
||||
printf("\n");
|
||||
return 0;
|
||||
}
|
||||
Executable
BIN
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user