,   CyberForum.ru

- C++

 
:  :  - 12,   - 4.67
Deirdre
   Deirdre
0 / 0 / 0
: 14.05.2009
: 14
20.05.2009, 20:38     #1
)
#include<math.h>
#include<stdio.h>
#include<alloc.h>
#include<conio.h>
#include<stdlib.h>

void main(void)

{
textbackground(6);
textcolor(RED);
clrscr();
int v,m,n,i,j;
C4:
clrscr();
printf("\n\n\n\n\n ͻ");
printf("\n 롥 * ***⮢: ");
printf("\n ");
printf("\n 1- ண* ");
printf("\n ");
printf("\n 2- ");
printf("\n ");
printf("\n 3- ?** * ");
printf("\n ");
printf("\n 4- 室 ");
printf("\n ");
printf("\n ͼ\n");
scanf("%d",&v);
switch(v)
{
case 1:goto C1;
break;
case 2:clrscr();
printf("\n\n\n\n\n");
printf(" HELP:\n\f\f\f ** * *童**: A(x) ⥫ B(x).");
printf("\n ண** 樥* ** **.");
printf("\n 樥*⮢ ** *, ");
printf("\n A[i], B[i] - 樥* n- ⥯* x.");
getch();
goto C4;
case 3: clrscr();
printf("\n\n\n\n\n\n\n ⮩ ண* - 㤥*");
printf("\n *ய஢᪮ **樮*** **");
printf("\n -* ਪ** *⥬*⨪ 㯯 K-03-1");
printf("\n ** **⮫쥢" );
printf("\n ** **!");
printf("\n *** ஢** **!");
getch();
goto C4;
case 4:
exit(0);

}

C1:

printf("\n A(n): ");
scanf("%d",&n);
printf(" B(n): ");
scanf("%d",&m);

if(m>n)
{
printf("ERROR!!!: ");
goto C1;
}
if((m==0)||(n==0))
{
printf("ERROR!!!: n m ");
goto C1;
}
double *a,*b,*k;
a=(double*)calloc(n+1,sizeof(double));
C2:
for(i=0;i<=n;i++)
{
printf("\n A(%d) ",i);
scanf("%lf",&a[i]);

if((i==n)&&(fabs(a[i])<=0.0001))
{
printf("ERROR!!!: n-o ");
goto C2;
}
else;
}

b=(double*)calloc(n+1,sizeof(double));
C3:
for(i=0;i<=m;i++)
{
printf("\n B(%d) ",i);
scanf("%lf",&b[i]);

if((i==m)&&(fabs(b[m])<=0.0001))
{
printf("ERROR!!!: m-o ");
goto C3;
}
}


k=(double*)calloc(n-m,sizeof(double));

//--------------------------------Osnovnaya chast--------------------------------------

for (j=0;j<=(n-m);j++)
{
k[j]=a[n-j]/b[m];

for(i=0;i<=n;i++)
{
if(i>=(n-(m+j)))
a[i]=(a[i]-(b[i+j-(n-m)]*k[j]));
}
}


//----------------------------------Resultati--------------------------------------------
printf("\n:");
printf("\n");

for (i=0;i<=(n-m);i++)

{
if(i==(n-m))
printf("(%g)",k[i]);
else if(n-(m+i)==1)
printf("(%g)X + ",k[i]);
else
printf("(%g)X^%d + ",k[i],n-(m+i));
}

printf("\n");
printf("\n:");
printf("\n");

for (i=n;i>=0;i--)

{
if(i==0)
printf("(%g)",a[i]);
else if (a[i]==0)
printf("");
else if(n-(m+i)==1)
printf("(%g)X + ",a[i]);
else
printf("(%g)X^%d + ",a[i],i);
}
int g;
C5:
printf("\n -- 1; -- 2.");
scanf("%d",&g);
if (g==1)
goto C4;
else if (g==2)
exit(0);
else goto C5;

}
Similar
41792 / 34177 / 6122
: 12.04.2006
: 57,940
20.05.2009, 20:38    
:

C++
(). C++
C++
( ) C++
C++
C++
C++ Move ( )
Ln(x): C++
: C++
C++
C++
C++



:
.
RazorQ
   RazorQ
576 / 343 / 9
: 06.02.2009
: 1,386
20.05.2009, 20:46     #2
Deirdre
#include<alloc.h>
. .

Deirdre
textbackground(6);

Deirdre
textcolor(RED);
.


2 36
.
C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
#include<math.h>
#include<stdio.h>
//#include<alloc.h>
#include<conio.h>
#include<stdlib.h>
 
void main(void)
 
{
//textbackground(6);
//textcolor(RED);
//clrscr();
int v,m,n,i,j;
C4:
//clrscr();
printf("\n\n\n\n\n ͻ");
printf("\n  롥 *  ***⮢: ");
printf("\n  ");
printf("\n  1-   ண* ");
printf("\n  ");
printf("\n  2-  ");
printf("\n  ");
printf("\n  3- ?**  * ");
printf("\n  ");
printf("\n  4- 室 ");
printf("\n  ");
printf("\n ͼ\n" );
scanf("%d",&v);
switch(v)
{
case 1:goto C1;
break;
case 2://clrscr();
printf("\n\n\n\n\n");
printf(" HELP:\n\f\f\f ** * *童**:  A(x)  ⥫ B(x).");
printf("\n ண**  樥* **  **.");
printf("\n   樥*⮢ ** *, ");
printf("\n  A[i], B[i] - 樥*  n- ⥯* x.");
getch();
goto C4;
case 3: //clrscr();
printf("\n\n\n\n\n\n\n  ⮩ ண* - 㤥*");
printf("\n *ய஢᪮ **樮*** **");
printf("\n -* ਪ** *⥬*⨪ 㯯 K-03-1");
printf("\n **  **⮫쥢" );
printf("\n  ** **!");
printf("\n *** ஢** **!");
getch();
goto C4;
case 4:
exit(0);
 
}
 
C1:
 
printf("\n    A(n): ");
scanf("%d",&n);
printf("    B(n): ");
scanf("%d",&m);
 
if(m>n)
{
printf("ERROR!!!:      ");
goto C1;
}
if((m==0)||(n==0))
{
printf("ERROR!!!:  n  m   ");
goto C1;
}
double *a,*b,*k;
a=(double*)calloc(n+1,sizeof(double));
C2:
for(i=0;i<=n;i++)
{
printf("\n A(%d) ",i);
scanf("%lf",&a[i]);
 
if((i==n)&&(fabs(a[i])<=0.0001))
{
printf("ERROR!!!:   n-o    ");
goto C2;
}
else;
}
 
b=(double*)calloc(n+1,sizeof(double));
C3:
for(i=0;i<=m;i++)
{
printf("\n B(%d) ",i);
scanf("%lf",&b[i]);
 
if((i==m)&&(fabs(b[m])<=0.0001))
{
printf("ERROR!!!:   m-o    ");
goto C3;
}
}
 
 
k=(double*)calloc(n-m,sizeof(double));
 
//--------------------------------Osnovnaya chast--------------------------------------
 
for (j=0;j<=(n-m);j++)
{
k[j]=a[n-j]/b[m];
 
for(i=0;i<=n;i++)
{
if(i>=(n-(m+j)))
a[i]=(a[i]-(b[i+j-(n-m)]*k[j]));
}
}
 
 
//----------------------------------Resultati--------------------------------------------
printf("\n:");
printf("\n");
 
for (i=0;i<=(n-m);i++)
 
{
if(i==(n-m))
printf("(%g)",k[i]);
else if(n-(m+i)==1)
printf("(%g)X + ",k[i]);
else
printf("(%g)X^%d + ",k[i],n-(m+i));
}
 
printf("\n");
printf("\n:");
printf("\n");
 
for (i=n;i>=0;i--)
 
{
if(i==0)
printf("(%g)",a[i]);
else if (a[i]==0)
printf("");
else if(n-(m+i)==1)
printf("(%g)X + ",a[i]);
else
printf("(%g)X^%d + ",a[i],i);
}
int g;
C5:
printf("\n     -- 1;   -- 2.");
scanf("%d",&g);
if (g==1)
goto C4;
else if (g==2)
exit(0);
else goto C5;
 
}
Deirdre
   Deirdre
0 / 0 / 0
: 14.05.2009
: 14
20.05.2009, 20:52  []     #3
#include<math.h>
#include<stdio.h>
//#include<alloc.h>
#include<conio.h>
#include<stdlib.h>

int main()

{
//textbackground(6);
//textcolor(RED);
//clrscr();
int v,m,n,i,j;
C4:
//clrscr();
printf("\n\n\n\n\n ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ");
printf("\n º ë¡¥à¥â¥ ¨* ¨ ¢*à¨**â¢: º");
printf("\n º º");
printf("\n º 1- ⨠¢ ¯à£à*ã º");
printf("\n º º");
printf("\n º 2- éì º");
printf("\n º º");
printf("\n º 3- ˆ*äà*æ¨ï ¡ *¢âॠº");
printf("\n º º");
printf("\n º 4- ëå º");
printf("\n º º");
printf("\n ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ\n");
scanf("%d",&v);
switch(v)
{
case 1:goto C1;
break;
// case 2:clrscr();
printf("\n\n\n\n\n");
printf(" HELP:\n\f\f\f ** ¢* *£ç¥**: ¥¨¥ A(x) ¨ ¥¨â¥ì B(x).");
printf("\n à£à** ¢ëç¨áï¥â ªíää¨æ¨¥*âë ç*áâ*£ ¨ áâ*âª*.");
printf("\n à¨ ¢¢¥ ªíää¨æ¨¥*⢠*ã* ãç¨âë¢*âì, ");
printf("\n çâ A[i], B[i] - ªíää¨æ¨¥*âë ¯à¨ n- á⥯¥*¨ x.");
getch();
goto C4;
// case 3: clrscr();
printf("\n\n\n\n\n\n\n ?¢âà íâ ¯à£à*ë - áâã¥*â");
printf("\n *¥¯à¯¥âà¢áª£ **æ¨**ì*£ ã*¨¢¥àá¨â¥â*");
printf("\n ä-â* à¨ª** *â¥*⨪¨ £àã¯¯ë K-03-1");
printf("\n ¥æ¥**ë ?àâñ ?**â쥢¨ç" );
printf("\n ᥠ¯à*¢* *é¨é¥*ë!");
printf("\n ¥*ª**¥ ª¯¨à¢**¨¥ *¯à¥é¥*!");
getch();
goto C4;
case 4:
exit(0);

}

C1:

printf("\n Ââåäèòå ñòåïåíü äåëèìîãî A(n): ");
scanf("%d",&n);
printf(" Ââåäèòå ñòåïåíü äåëèòåëÿ B(n): ");
scanf("%d",&m);

if(m>n)
{
printf("ERROR!!!: Ñòåïåíü äåëèìîãî íå ìåíüøå ñòåïåíè äåëèòåëÿ");
goto C1;
}
if((m==0)||(n==0))
{
printf("ERROR!!!: Ñòåïåíè n è m íå ðàâíû íóëþ");
goto C1;
}
double *a,*b,*k;
a=(double*)calloc(n+1,sizeof(double));
C2:
for(i=0;i<=n;i++)
{
printf("\nÂâåäèòå A(%d) êîýôôèöèåíò",i);
scanf("%lf",&a[i]);

if((i==n)&&(fabs(a[i])<=0.0001))
{
printf("ERROR!!!: Êîýôôèöèåíò ïðè n-oé ñòåïåíè íå ðàâåí íóëþ");
goto C2;
}
else;
}

b=(double*)calloc(n+1,sizeof(double));
C3:
for(i=0;i<=m;i++)
{
printf("\nÂâåäèòå B(%d) êîýôôèöèåíò",i);
scanf("%lf",&b[i]);

if((i==m)&&(fabs(b[m])<=0.0001))
{
printf("ERROR!!!: Êîýôôèöèåíò ïðè m-oé ñòåïåíè íå ðàâåí íóëþ");
goto C3;
}
}


k=(double*)calloc(n-m,sizeof(double));

//--------------------------------Osnovnaya chast--------------------------------------

for (j=0;j<=(n-m);j++)
{
k[j]=a[n-j]/b[m];

for(i=0;i<=n;i++)
{
if(i>=(n-(m+j)))
a[i]=(a[i]-(b[i+j-(n-m)]*k[j]));
}
}


//----------------------------------Resultati--------------------------------------------
printf("\n×ÀÑÒÍÎÅ:");
printf("\n");

for (i=0;i<=(n-m);i++)

{
if(i==(n-m))
printf("(%g)",k[i]);
else if(n-(m+i)==1)
printf("(%g)X + ",k[i]);
else
printf("(%g)X^%d + ",k[i],n-(m+i));
}

printf("\n");
printf("\nÎÑÒÀÒÎÊ:");
printf("\n");

for (i=n;i>=0;i--)

{
if(i==0)
printf("(%g)",a[i]);
else if (a[i]==0)
printf("");
else if(n-(m+i)==1)
printf("(%g)X + ",a[i]);
else
printf("(%g)X^%d + ",a[i],i);
}
int g;
C5:
printf("\nÄëÿ âîçâðàòà â ìåíþ íàæìèòå -- 1; äëÿ âûõîäà -- 2.");
scanf("%d",&g);
if (g==1)
goto C4;
else if (g==2)
exit(0);
else goto C5;

}

3 2
!!))
ISergey
Maniac
 ++
   ISergey
1345 / 878 / 51
: 02.01.2009
: 2,642
: 1
20.05.2009, 20:56     #4
C1,C2,C3,C4,C5 .
.
Deirdre
   Deirdre
0 / 0 / 0
: 14.05.2009
: 14
20.05.2009, 20:57  []     #5
??????
ISergey
Maniac
 ++
   ISergey
1345 / 878 / 51
: 02.01.2009
: 2,642
: 1
20.05.2009, 21:09     #6
Deirdre
??????
, goto.
, ...
Yandex
20.05.2009, 21:09    

: 02:45. GMT +3.
- , ,
-
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
@Mail.ru