31 lines
318 B
C
31 lines
318 B
C
|
#include <stdio.h>
|
||
|
|
||
|
#define N 2
|
||
|
|
||
|
struct vector {
|
||
|
float _[N];
|
||
|
};
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
struct vector X;
|
||
|
void AfficheVect (struct vector X);
|
||
|
|
||
|
X._[0]= 1;
|
||
|
X._[1]= 2.;
|
||
|
|
||
|
AfficheVect(X);
|
||
|
|
||
|
return 1;
|
||
|
}
|
||
|
|
||
|
void AfficheVect (struct vector X)
|
||
|
{
|
||
|
|
||
|
for(int i=0; i<N ; i++)
|
||
|
{
|
||
|
printf("%f \n",X._[i]);
|
||
|
}
|
||
|
return;
|
||
|
}
|