[ create a new paste ] login | about

Link: http://codepad.org/JXf2wscr    [ raw code | output | fork ]

C, pasted on Feb 17:
#include <stdio.h>
main()
{
 /* Déclarations */
 int A[50]; /* tableau donné  */
 int N;     /* dimension      */
 int I;     /* indice courant */
 int MIN;   /* position du minimum */
 int MAX;   /* position du maximum */
 /* Saisie des données */
 printf("Dimension du tableau (max.50) : ");
 scanf("%d", &N );
 for (I=0; I<N; I++)
    {
     printf("Elément %d : ", I);
     scanf("%d", &A[I]);
    }#include <stdio.h>
main()
{
 /* Déclarations */
 int A[50]; /* tableau donné  */
 int N;     /* dimension      */
 int I;     /* indice courant */
 int MIN;   /* position du minimum */
 int MAX;   /* position du maximum */
 /* Saisie des données */
 printf("Dimension du tableau (max.50) : ");
 scanf("%d", &N );
 for (I=0; I<N; I++)
    {
     printf("Elément %d : ", I);
     scanf("%d", &A[I]);
    }}


Output:
1
2
3
4
5
6
7
8
In function 'main':
Line 17: error: stray '#' in program
Line 17: error: 'include' undeclared (first use in this function)
Line 17: error: (Each undeclared identifier is reported only once
Line 17: error: for each function it appears in.)
Line 17: error: 'stdio' undeclared (first use in this function)
Line 19: error: expected ';' before '{' token
Line 33: error: expected declaration or statement at end of input


Create a new paste based on this one


Comments: