Write a C++ function to generate a list of 20 random numbers?
-
Write a C++ function to generate a list of 20 random numbers between 10 and 50 and store these numbers into an array of integer named rand_numbers. (C++ coding PLEASE!!)
-
Answer:
writing just the code segment : . . . int k[20]; randomize(); for(int i=0;i<20;i++) { k[i]=random()+10; } . . .
BIG C at Yahoo! Answers Visit the source
Other answers
Im sorryy but wtf are you asking me i dont know what it is you want but you are not getting paid u stupid monkey i pay u to **** not asjk
include<iostream.h> #include<conio.h> #include<time.h> int random() { int r; r=rand()%50+1; return r; } main() { int a[20]; for(int i=0;i<=20;i++) { a[i]=random(); } cout<<"Displaying teh random numbers"; for(i=0;i<=20;i++) { cout<<a[i]; } getch(); } next time present you code so that people could correct it and give you answer faster
Related Q & A:
- Is there a tool where you give a list of things and it returns related words?Best solution by Web Applications
- How to write a parser in C?Best solution by Stack Overflow
- How to generate cryptographically random numbers?Best solution by Stack Overflow
- How long should I give a prof to write a letter of recommendation for a graduate school application?Best solution by Yahoo! Answers
- Are a c.n.a. and a medical assistant the same thing?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.