answersLogoWhite

0


Best Answer

#include<stdio.h> #include<stdlib.h>

int main(void)

{

int i;

int j[100];

for(i=0;i<100;i++)

{

j[i]=rand()%100;

printf("%d",j[i]);

}

}

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

for (int i=0; i<100; i++) printf("%d %d\n", i, (int)((double)rand()/RAND_MAX*100));

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a C plus plus code segment that generates and displays 100 random 3-digit positive integers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you interface 3-multiplexed 7-segment displays with 8051or5052or--53--54--55 microcontroller to display a random number from 000 to 999 with 1sec delay?

You should use a mechanism called persistance of vision for interfacing multiple seven segment displays. here is tutorial for mulplexing displays using 8051 microcontroller. http://www.shree-electronics.com/interfacing_multiple_7_segment_displays.htm


The length of a segment is positive?

Length is always positive, this is one of the basic properties of length and distance.


What does market segment mean?

Segmenting is when you see the need to target one specific group or market for your products/services. The particular group (segment) has or displays a different need from the rest of the consumer population.


What is the movement of large segment of the earthes crust?

i am not positive, but possibly continental drift


How do the original designs of a calculator and choice of materials differ from those in used today?

The biggest difference has been the types of displays used:punched cards (needed to be printed using separate printer)miniature cathode ray tube displayNIXIE tube display (neon lamp)adding machine tape mechanical printerthermal paper mechanical printerlight emitting diode 7 segment displayliquid crystal 7 segment displaysvacuum fluorescent 7 segment displayliquid crystal alphanumeric displaysliquid crystal graphics displays


How does 7 segment works?

A seven segment display is a device used to display numbers and letters on things such as alarm clocks. A 7 segment display is simply seven LEDs packaged in a pattern that allows numbers and letters to be displayed by illuminating different sets of LEDs. https://www.youtube.com/watch?v=kveP66YZyKg


What does segmenting mean in marketing?

Segmenting is when you see the need to target one specific group or market for your products/services. The particular group (segment) has or displays a different need from the rest of the consumer population.


Does a line never have an endpoint?

By definition a line has no endpoint as it can extend to negative and positive infinity. A ray has one endpoint and a segment has two endpoints.


Why are the absolute value symbols used when indicating the length of a line segment?

Because line segment lengths are often calculated as a square root, the absolute value symbols indicate it is only the positive solution that counts, as a distance cannot be negative.


What is a macro in flow code?

Flowcode uses macros to facilitate the control of complex devices including 7-segment displays, LCD displays, ZigBee RF devices, TCP/IP modules etc. The use of macros allows developers to control highly complex electronic systems without getting bogged down in understanding the programming involved.


What does segment?

Nothing "does" a segment and, being inanimate, a segment does nothing.


What actors and actresses appeared in Pribytiye poyezda - 1996?

The cast of Pribytiye poyezda - 1996 includes: Lyudmila Aleksandrova as (segment "Trofim") Aleksey Balabanov as (segment "Trofim") Sergey Barkovskiy as (segment "Trofim") Aleksandr Bashirov as Cameraman (segment "Excercise No.5") Vladimir Bogdanov as (segment "Excercise No.5") Zoya Buryak as (segment "Trofim") Giya Chanturiya as (segment "Doroga") Aleksandr Dubina as (segment "Doroga") Aleksey German as (segment "Trofim") Yekaterina Golubeva as (segment "Excercise No.5") Yuriy Golubtsov as (segment "Doroga") Leonid Gromov as (segment "Excercise No.5") Mikhail Guro as (segment "Trofim") Vladimir Ilin as (segment "Doroga") Aleksandr Kaydanovskiy as (segment "Svadebnyy marsh") Yelena Kolegova as (segment "Doroga") Natalya Korennaya as (segment "Doroga") Andrey Krasko as (segment "Excercise No.5") Tamara Lipartiya as (segment "Trofim") Sergey Makovetskiy as (segment "Trofim") Oleg Melnik as (segment "Excercise No.5") Yun Meng as (segment "Excercise No.5") Dmitry Meskhiev as (segment "Exercise No. 5" and "Trofim") Irina Metlitskaya as (segment "Excercise No.5") Vladimir Piskunov as (segment "Doroga") Aleksandr Polovtsev as (segment "Excercise No.5") Viktor Poluyektov as (segment "Trofim") Sergey Razhuk as (segment "Trofim") Aleksey Serebryakov as (segment "Excercise No.5") Igor Shibanov as (segment "Trofim") Ivan Shvedoff as (segment "Excercise No.5") Denis Sinyavsky as (segment "Excercise No.5") Yevgeniya Smolyaninova as (segment "Doroga") Vadim Stepashkin as (segment "Doroga") Semyon Strugachyov as (segment "Trofim") Garik Sukachyov as (segment "Doroga") Anna Syomkina as (segment "Svadebnyy marsh") Viktor Tikhomirov as (segment "Excercise No.5") Nina Usatova as (segment "Excercise No.5") Konstantin Yushkevich as (segment "Doroga") Aleksei Zhirov as (segment "Svadebnyy marsh")