-
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!
- Apple Watch Series 10 42mm Jet Black 96% (1év Garancia)
- Gamer PC-Számítógép! Felsőkategória! R7 9800X3D / RX 9070XT / 32GB DDR5 / 2TB SSD / Noctua !
- LG 32GS95UX - 32" OLED / UHD 4K / 240Hz - 480Hz & 0.03ms / 1300 Nits / NVIDIA G-Sync / AMD FreeSync
- Szuper áron eladó Lenovo ThinkPad T14 Gen 1 /Ryzen 7 PRO 4750U/16GB/512 SSD/FHD/IPS
- Mini Pc HP ProDesk 600 G2 G3 G4, Acer Vertion /// 6-8. gen //// i3 / i5 /// garancia / Bp., MPL, Fox
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest



