Agilent Technologies VEE Pro Betriebsanweisung Seite 33

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 602
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 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);
}
Seitenansicht 32
1 2 ... 28 29 30 31 32 33 34 35 36 37 38 ... 601 602

Kommentare zu diesen Handbüchern

Keine Kommentare