ProgIng - Programación en Ingeniería
Loading...
Searching...
No Matches
Ejemplo032.c File Reference
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for Ejemplo032.c:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

◆ main()

int main ( int argc,
char * argv[] )

Definition at line 4 of file Ejemplo032.c.

5{
6 int i;
7 float pi;
8 if(argc>1)
9 {
10 for(i=1, pi=0; i<argc; i++)
11 pi+=atof(argv[i]);
12 printf("La suma es %f\n", pi);
13 return 0;
14 }
15 else
16 return 1;
17}