This file contains hidden or 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
| Program lab9; | |
| uses crt,graph,obj_un; | |
| type rect=object(gr) | |
| x,y,r:integer; | |
| procedure setd(px,py,rad:integer); | |
| procedure show; | |
| procedure hide; | |
| end; | |
| procedure rect.setd(px,py,rad:integer); | |
| begin |
This file contains hidden or 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> | |
| void vvod(int a[3][3]) | |
| { | |
| printf("Введите матрицу:\n"); | |
| for (int i=0;i<3;i++) { | |
| for (int j=0;j<3;j++) {scanf("%i",&a[i][j]);}} | |
| } | |
| void vyvod(int a[3][3]) | |
| { |
This file contains hidden or 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
| Program ex4; | |
| uses crt; | |
| const nmax=20; | |
| type mas=array[1..nmax] of real; | |
| var | |
| art:mas; | |
| kol,k:Byte; | |
| procedure input(var ar:mas; n:byte); | |
| var i:integer; | |
| begin |
This file contains hidden or 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> | |
| void input(int a[3][3]) | |
| { | |
| int i,j; | |
| printf("Введите матрицу 3x3:\n"); | |
| for (i=0;i<3;i++) { | |
| for (j=0;j<3;j++) {scanf("%3i",&a[i][j]);}} | |
| } | |
| void output(int a[3][3]) |
This file contains hidden or 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> | |
| void vvod(int a[3][3]) | |
| { | |
| printf("Введите матрицу:\n"); | |
| for (int i=0;i<3;i++) { | |
| for (int j=0;j<3;j++) {scanf("%i",&a[i][j]);}} | |
| } | |
| void vyvod(int a[3][3]) | |
| { |
This file contains hidden or 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> | |
| void main() | |
| { | |
| int count,i,j,b[3]; | |
| int a[3][3]={4,3,-1,6,-2,7,-1,9,3}; | |
| printf("Исходная матрица:\n"); | |
| for (i=0;i<3;i++) { | |
| for (j=0;j<3;j++) {printf("%3i",a[i][j]);} | |
| printf("\n");} | |
| for (i=0;i<3;i++) { |
This file contains hidden or 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> | |
| float calculate(int a, int b) | |
| { | |
| float m; | |
| m=(a+b)/2; | |
| return m; | |
| } | |
| float calculate(float a, float b, float c) | |
| { | |
| float m; |
This file contains hidden or 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 <math.h> | |
| void main() | |
| { | |
| float x,y,xn=2.5,xk=7.5,hx=0.5,a=5.0; | |
| printf("\n X Y\n"); | |
| for (x=xn;x <= xk;x+=hx) { | |
| if (x <= a) {y=pow(cos(x)+pow(x,3),1.0/3);} else {y=(3*x+5)/pow(x,2);} | |
| printf("%8.5f %8.5f\n",x,y); | |
| } |
This file contains hidden or 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<math.h> | |
| main() | |
| { | |
| float x,y,z,b; | |
| printf("Введите значение x:\n"); | |
| scanf("%f",&x); | |
| printf("Введите значение y:\n"); | |
| scanf("%f",&y); | |
| z=x/sin(x)+y/cos(y); |
This file contains hidden or 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
| unit obj_un; | |
| interface | |
| uses graph; | |
| type gr=object | |
| gd,gm:integer; | |
| procedure graphinit; | |
| procedure graphclose; | |
| end; | |
| implementation | |
| procedure gr.graphinit; |