-
Fototrend

Új hozzászólás Aktív témák
-
amargo
addikt
válasz
Steve-S
#3114
üzenetére
// crt_rand.c
// This program seeds the random-number generator
// with the time, then displays 10 random integers.
//
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
int main( void )
{
int i;
// Seed the random-number generator with current time so that
// the numbers will be different every time we run.
//
srand( (unsigned)time( NULL ) );
// Display 10 numbers.
for( i = 0; i < 10;i++ )
printf( " %6d\n", rand() );
printf("\n");
// Usually, you will want to generate a number in a specific range,
// such as 0 to 100, like this:
{
int RANGE_MIN = 0;
int RANGE_MAX = 100;
for (i = 0; i < 10; i++ )
{
int rand100 = (((double) rand() /
(double) RAND_MAX) * RANGE_MAX + RANGE_MIN);
printf( " %6d\n", rand100);
}
}
}De van a Random.Next(10) de ez asszem .NET-es vagy a random(10) is jó lehet, kicsi help olvasgatás

Új hozzászólás Aktív témák
● olvasd el a téma összefoglalót!
- Intel Core ULTRA 9 285K +32GB 7600MHz Patriot Viper XTREME 5 DDR5 kit! (Bolti ár: kb 600ezer Ft!)
- Samsung Galaxy S25 12/256GB Navy Blue (Gari: 2029.04.10)
- POWERCOLOR RX 9070 XT 16GB GDDR6 RED DEVIL - Új, 2 év gari - Eladó!
- GIGABYTE GTX 1660 SUPER 6GB GDDR6 OC Eladó!
- BIZTOSÍTÁSSAL iPad Pro 13 M4 Ezüst + Apple Pencil Pro
- Samsung Galaxy S24 - Titanium Black - 8/256GB
- Lenovo Thinkpad E595 Ryzen 5 3500U, Radeon Vega 8, 8-16GB RAM, SSD, jó akku, számla, gar
- Eladó egy WD blue 2,5 1tb sata ssd
- iPhone 13 128GB 100% (1év Garancia) - ÚJ UTÁNGYÁRTOTT AKKUMULÁTOR
- Akciós áron eladó HP Dragonfly G3 /I7-1265U/32 GB/512B SSD/13,5"/FHD+/400nit/Touch
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest


