Лабораторная работа: Лабораторные работы
Описание
Характеристики лабораторной работы
Список файлов
- Лабораторные работы
- lab2.pdf 104,94 Kb
- lab2.xmcd 38,24 Kb
- lab3.pdf 80,63 Kb
- lab3.xmcd 41,49 Kb
- lab4.pdf 73,27 Kb
- lab_3.mcd 11,82 Kb
- Прочти меня.txt 122 b
- лабbl по ЧМ
- My lab
- 1_.cpp 1,13 Kb
- 1_.exe 21,03 Kb
- 1_.out 8,46 Kb
- 1_.txt 1,13 Kb
- 2_.cpp 1,46 Kb
- 2_.exe 21,77 Kb
- 2_.out 8,5 Kb
- 2_.txt 1,46 Kb
- laba1.bdsproj 8,18 Kb
- laba1.bdsproj.local 739 b
- laba1.cfg 494 b
- laba1.dpr 680 b
- backup
- Project1.cfg 386 b
- Project1.dof 2,2 Kb
- Project1.dpr 213 b
- Project1.exe 398,5 Kb
- Project1.ico 133,83 Kb
- Project1.lpi 2,67 Kb
- Project1.lpi.bak 2,3 Kb
- Project1.manifest 791 b
- Project1.rc 278 b
- Project1.res 1,5 Kb
- Project1.~dpr 213 b
- Unit1.dcu 4,66 Kb
- Unit1.ddp 51 b
- Unit1.dfm 5,09 Kb
- Unit1.o 166,55 Kb
- Unit1.pas 1,17 Kb
- Unit1.pas.bak 1,25 Kb
- Unit1.~ddp 51 b
- Unit1.~dfm 5,09 Kb
- Unit1.~pas 1,25 Kb
- Unit2.dcu 2,65 Kb
- Unit2.o 8,89 Kb
- Unit2.pas 1,87 Kb
- Unit2.pas.bak 1,99 Kb
- Unit2.ppu 2,65 Kb
- Unit2.~pas 2,16 Kb
Файл скачан с сайта StudIzba.com
При публикации файла на другом ресурсе, активная гиперссылка на studizba.com обязательна
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
//#include <termios.h>
//#include <term.h>
//#include <curses.h>
//#include <ncurses.h>
#include <unistd.h>
//#include <pthread.h>
#include <time.h>
//#include <conio.h>
//______________________________________ ________
/*
void slept(unsigned int mseconds)
{
clock_t goal = mseconds + clock();
while (goal > clock());
}
*/
//______________________________________ ________
double p;
double z,Ln=0;
int i,j,n;
double x[100];
double y[100];
//______________________________________ ________
int main(void)
{
printf("BBeDuTe 4ucJIo y3JIoB ");
scanf("%d",&n);
//if
for (i=1;i<=n;i++)
{
printf("BBeDuTe y3eJI ");
scanf("%lf",&x[i]);
printf("BBeDuTe 3Ha4eHue ");
scanf("%lf",&y[i]);
}
printf("BBeDuTe To4ky ");
scanf("%lf",&z);
for (i=1;i<=n;i++)
{ p=1;
for (j=1;j<=n;j++)
{ if (i!=j) p=p*(z-x[j])/(x[i]-x[j]); }
Ln=Ln+y[i]*p;
}
printf("%f",Ln);
//______________________________________ ________
//"xx=%l",xx
printf("BBeDuTe 0 DJI9 BbIxoDa ");
//slept(10000);
int u;
u=1;
for (i=1;i<1000;i++)
{scanf("%d",&u); if (u==0) return 0;}
return 0;
}
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
//#include <termios.h>
//#include <term.h>
//#include <curses.h>
//#include <ncurses.h>
#include <unistd.h>
//#include <pthread.h>
#include <time.h>
//#include <conio.h>
//______________________________________ ________
/*
void slept(unsigned int mseconds)
{
clock_t goal = mseconds + clock();
while (goal > clock());
}
*/
//______________________________________ ________
double p,d,t;
double z,Ln;
int i,j,k,n;
double e;
double x[100];
double y[100];
//______________________________________ ________
int main(void)
{
printf("BBeDuTe To4ky [0,1] ");
scanf("%lf",&z);
printf("BBeDuTe nopoz To4HocTu ");
scanf("%lf",&e);
//if
/*
for (i=1;i<=n;i++)
{
printf("BBeDuTe y3eJI ");
scanf("%lf",&x[i]);
printf("BBeDuTe 3Ha4eHue ");
scanf("%lf",&y[i]);
}
printf("BBeDuTe To4ky ");
scanf("%lf",&z);
*/
x[1]=0;
y[1]=1;
for (n=3;n<=100000;n++)
{ Ln=0; t=9;
d=(float) 1/(n-1); //!!!!!!!!!!!
for (k=2;k<=n;k++) { x[k]=x[k-1]+d; y[k]=exp(x[k]); }
for (i=1;i<=n;i++)
{ p=1;
for (j=1;j<=n;j++)
{ if (i!=j) p= (float) p*(z-x[j])/(x[i]-x[j]); }
Ln=Ln+y[i]*p;
}
t=fabs(exp(z)-Ln);
if (t<e) break;
}
printf("4uCJIo y3JIoB= %d\n",n);
//______________________________________ ________
//"xx=%l",xx
//printf(" ");
printf("BBeDuTe 0 DJI9 BbIxoDa ");
//slept(10000);
int u;
u=1;
for (i=1;i<1000;i++)
{scanf("%d",&u); if (u==0) return 0;}
return 0;
}
Начать зарабатывать