Agilent Technologies VEE Pro Guide de l'utilisateur Page 33

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 602
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 32
Introduction
VEE Pro User’s Guide 5
Figure I-1. The “Random” Program in ANSI C
Figure I- 2 shows the same program in VEE.
/* Program to find maximum element in array */
#include <math.h>
main( )
{
double num[10],max;
int i;
for (i=0;i<10;i++){
num[i]=(double) rand( )/pow(2.0,15.0);
printf("%f/n",num[i];
}
max=num[0];
for {i=1;i<10;i++){
if (num[i]>max)max=num[i];
}
printf("/nmax; %f/n",max);
}
Vue de la page 32
1 2 ... 28 29 30 31 32 33 34 35 36 37 38 ... 601 602

Commentaires sur ces manuels

Pas de commentaire