Agilent Technologies VEE Pro Podręcznik Użytkownika Strona 33

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 602
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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);
}
Przeglądanie stron 32
1 2 ... 28 29 30 31 32 33 34 35 36 37 38 ... 601 602

Komentarze do niniejszej Instrukcji

Brak uwag