Ajout de la fiche C5.

This commit is contained in:
2021-10-12 15:36:03 +02:00
parent f61ee77c30
commit 78a2846be6
8 changed files with 393 additions and 0 deletions
+101
View File
@@ -0,0 +1,101 @@
0.9118130649
0.1978739188
0.0212072581
0.1534668557
0.3298535535
0.5760254218
0.4381827526
0.5816270832
0.0515604833
0.2074427159
0.7630974347
0.5598221170
0.0258730866
0.3787973884
0.9572602109
0.6387994252
0.4060787259
0.5437848221
0.8143657214
0.3582635181
0.8431708389
0.0700887568
0.4112142303
0.0428363442
0.3410031302
0.0257707626
0.1181194632
0.6449685870
0.6545365500
0.1638872445
0.8173519428
0.6529314273
0.5245821590
0.7833194632
0.9290176739
0.4909925378
0.4667649091
0.2220682436
0.3504689448
0.2347353441
0.6403380524
0.0474274445
0.7944080787
0.7216111236
0.3953576631
0.0263044352
0.5765490866
0.2742924874
0.1860104857
0.7877823439
0.0299106232
0.6945104939
0.5873353801
0.2437722819
0.2149499920
0.4306127114
0.3269448290
0.2273245695
0.4580675074
0.3712311047
0.3289867871
0.4559788307
0.7041764559
0.8933182530
0.3089954723
0.4032462723
0.2158870254
0.9559987220
0.2019645842
0.9996827615
0.6655249961
0.6397320066
0.6545196344
0.8723591448
0.9541941638
0.5289650232
0.1270053751
0.3247024337
0.3649609797
0.8178562239
0.1267955625
0.8069191878
0.9554803935
0.6959765428
0.4087098908
0.5988658206
0.6923947831
0.6947706244
0.0981116039
0.7434562813
0.6927235575
0.7054731405
0.8787015681
0.1013912014
0.9848433426
0.8775026461
0.6526330456
0.0226397827
0.1495707863
0.4363082129
+101
View File
@@ -0,0 +1,101 @@
0.7655171387
0.3364106004
0.6532145958
0.4493162137
0.0675585413
0.9858276664
0.5751995476
0.0939836854
0.3334896385
0.1617961540
0.9754573287
0.9928478945
0.2528806984
0.1631786526
0.0905548943
0.4899751374
0.6350594483
0.5366875194
0.1203735201
0.8286755421
0.3305558520
0.5892422266
0.8720543405
0.3657083391
0.6948728680
0.9409857925
0.2169637642
0.4275253027
0.7190094659
0.0027864075
0.8309045103
0.0570429986
0.2509321892
0.8056808179
0.1401044542
0.5088765203
0.7013367218
0.4990793721
0.7030743301
0.5966942059
0.0181223664
0.4724383218
0.4411935401
0.8670254268
0.8599093334
0.5106019023
0.8115700497
0.7521111744
0.9426765923
0.4266011661
0.8828901534
0.5731436351
0.7198992174
0.6005920311
0.9087119559
0.5183514795
0.7607622338
0.7708513398
0.5126483539
0.8826476999
0.7163206613
0.3722954080
0.2005183194
0.4964657192
0.2633393450
0.2202964525
0.7360434800
0.1201241133
0.2543017097
0.9036402902
0.0544300880
0.4831522858
0.2170616474
0.4008327977
0.7112978735
0.4485293798
0.1579562626
0.5774982362
0.2096995030
0.1423740985
0.7143601995
0.6903057696
0.0869484641
0.6125806160
0.4477351908
0.5454114506
0.6601760320
0.8227516540
0.8762816933
0.9218180023
0.4776271354
0.3066525712
0.4591103301
0.2824532283
0.1859699215
0.6553880610
0.9257080097
0.1982033141
0.4715063191
0.6462318809
+101
View File
@@ -0,0 +1,101 @@
0.6997351731
0.1310650873
0.5526438900
0.1594303416
0.7310189925
0.6570125776
0.8222758410
0.0828924616
0.3467998498
0.6653432558
0.0123287972
0.7278880324
0.7834951135
0.9958476885
0.0181126037
0.1607277232
0.1235060671
0.4938394043
0.3151050234
0.1398898195
0.4105729482
0.9119789965
0.5956702903
0.9951879000
0.7708859723
0.5425843260
0.9628921942
0.1941712808
0.4743764611
0.9305086022
0.8987194746
0.2686384749
0.4446489444
0.1064797799
0.7684423039
0.4195268404
0.9930464243
0.6917910585
0.2697549383
0.7384433341
0.0722648031
0.5682819959
0.3230073676
0.3292697044
0.4048756249
0.8327711445
0.7690018163
0.5255065142
0.2909635479
0.7980218812
0.0139363458
0.9598224945
0.5927233488
0.4649490598
0.3332417128
0.5216011646
0.4157332778
0.3321352414
0.7723855032
0.5220910084
0.5821955972
0.1182201464
0.8998132538
0.6243561122
0.8727763940
0.7627161647
0.9795541377
0.7157499496
0.1053734547
0.0036770280
0.9578751938
0.8425182925
0.2785482939
0.0193679895
0.8833187660
0.1062437214
0.9755520654
0.0407815511
0.6428554238
0.3013502737
0.3803593958
0.0073727469
0.8684727567
0.1228876359
0.7044566250
0.7095079992
0.9394270490
0.4424307072
0.1572321824
0.4834075081
0.2610774975
0.3455522111
0.7155688117
0.4798491805
0.9689530615
0.5728153282
0.3838934646
0.8076402500
0.1885440403
0.7746503572
+27
View File
@@ -0,0 +1,27 @@
#include <stdio.h>
#define N 100
int main() {
double tab[N];
for(int i=0;i<N;i++){
printf("Valeur d'indice %d : ",i);
scanf("%lf", tab+i);
}
double sum = tab[0];
double min = tab[0];
double max = tab[0];
printf("\nVoici les valeurs : [%f",*tab);
for(int i=1;i<N;i++){
printf(",%f",*(tab+i));
sum += tab[i];
min = (tab[i]<min)?tab[i]:min;
max = (tab[i]>max)?tab[i]:max;
}
printf("]\n");
printf("Moyenne : %f , Minimum : %f , Maximum : %f\n",sum/N,min,max);
}
+38
View File
@@ -0,0 +1,38 @@
#include<stdio.h>
#define N 30
int main() {
int pascal [N][N];
for(int n=1;n<N;n++){
pascal[n][0] = 1;
for(int k=1;k<n;k++)
pascal[n][k] = pascal[n-1][k-1] + pascal[n-1][k];
pascal[n][n] = 1;
}
int n;
while(1){
printf("(-1 pour fermer)Calcul pour n=");
scanf("%d",&n);
if(n==-1)break;
if(n<-1 || n>=N)continue;
printf("(a+b)^%d = ",n);
if(n==0)
printf("1\n");
else {
printf("a^%d",n);
for(int k=1;k<n;k++){
printf(" + %d*a^%d*b^%d",pascal[n][k],n-k,k);
}
printf(" + b^%d\n",n);
}
}
printf("Vous auriez quand même pu faire de tête ....\n");
}
+9
View File
@@ -0,0 +1,9 @@
10
0
1
2
30
-12
1
-1
+6
View File
@@ -0,0 +1,6 @@
(-1 pour fermer)Calcul pour n=(a+b)^10 = a^10 + 10*a^9*b^1 + 45*a^8*b^2 + 120*a^7*b^3 + 210*a^6*b^4 + 252*a^5*b^5 + 210*a^4*b^6 + 120*a^3*b^7 + 45*a^2*b^8 + 10*a^1*b^9 + b^10
(-1 pour fermer)Calcul pour n=(a+b)^0 = 1
(-1 pour fermer)Calcul pour n=(a+b)^1 = a^1 + b^1
(-1 pour fermer)Calcul pour n=(a+b)^2 = a^2 + 2*a^1*b^1 + b^2
(-1 pour fermer)Calcul pour n=(-1 pour fermer)Calcul pour n=(-1 pour fermer)Calcul pour n=(a+b)^1 = a^1 + b^1
(-1 pour fermer)Calcul pour n=Vous auriez quand même pu faire de tête ....
+10
View File
@@ -0,0 +1,10 @@
exec1="/tmp/C5.1"
exec2="/tmp/C5.2"
cat C5.1.1.dat | $exec1 | grep "Moyenne : 0.484791 , Minimum : 0.021207 , Maximum : 0.999683" > /dev/null &&
cat C5.1.2.dat | $exec1 | grep "Moyenne : 0.516676 , Minimum : 0.002786 , Maximum : 0.992848" > /dev/null &&
cat C5.1.3.dat | $exec1 | grep "Moyenne : 0.518768 , Minimum : 0.003677 , Maximum : 0.995848" > /dev/null &&
cat C5.2.dat | $exec2 | diff - C5.2.res.dat &&
echo "Les executions se sont faites avec succès !"