This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <conio.h> | |
#include <graphics.h> | |
void Draw ( int x, int y, int color ) | |
{ | |
setfillstyle ( 1, color ); // Сплошная заливка, цвет color | |
bar ( x, y, x+20, y+20 ); // залитый квадрат | |
} | |
main() | |
{ | |
int x,y,code; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <conio.h> | |
#include <graphics.h> | |
void Draw ( int x, int y, int color ) | |
{ | |
setfillstyle ( 1, color ); | |
bar ( x, y, x+20, y+20 ); | |
} | |
main() | |
{ | |
int x,y,code,dx,dy; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <graphics.h> | |
#include <conio.h> | |
#include <stdlib.h> | |
int random (int N) { return rand() % N; } | |
main() | |
{ | |
int x, y, R, G, B; | |
initwindow (500, 500); | |
while ( ! kbhit () ) //пока не нажата клавиша | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ctime> | |
#include <stdio.h> | |
#include <conio.h> | |
#include <stdlib.h> | |
const int N = 10; | |
main() { | |
int i,j, A[N],nmin,c,m,L=0,R=N-1,x,flag; | |
srand(time(NULL)); | |
for ( i = 0; i < N; i ++ ) | |
A[i] = rand()%(21)-10; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <conio.h> | |
#include <string.h> | |
main() | |
{ | |
char pass[] = "пароль", // правильный пароль | |
s[80]; | |
printf ("Введите пароль:\n "); | |
gets(s); | |
if ( strcmp ( pass, s )){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <conio.h> | |
#include <stdio.h> | |
#include <string.h> | |
main(){ | |
char s[80]; | |
int i=0; | |
printf("Введите имя файла: \n"); | |
gets(s); | |
while ((s[i] != '.') &&(s[i] !='\0')) // ищем точку или конец строки |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <conio.h> | |
#include <stdio.h> | |
#include <string.h> | |
main(){ | |
char s[80], | |
a[80]="Привет, "; | |
int n=0, len; | |
printf("Введите фамилию и имя: \n"); | |
gets(s); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <conio.h> | |
#include <stdio.h> | |
#include <string.h> | |
main(){ | |
char s[80]= "Война и Мир", *p, | |
a[80]= "Гитара", | |
str[]= "ар", | |
ch= 'и'; | |
p = strchr(s,ch); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <conio.h> | |
main(){ | |
char s[80], word[30]. | |
*p; | |
int count=0, len; | |
printf("Enter sentence: %s\n", s ); | |
gets(s); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <conio.h> | |
main(){ | |
char s[80]; | |
FILE *fp; | |
int x,y; | |
fp = fopen("input.txt", "r"); | |
while (fgets(s,80,fp)) |
OlderNewer