Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

C programming

15/09/2020 Client: murali Deadline: 24 Hours

 


0) Random number generation. (50 pts)


Often, computer scientists, statisticians, physicists, social scientists, and mathematicians need a list of random numbers. Political pundits also find lists of random numbers useful to provide 'statistical' evidence of their arguments.


Implement a tool to generate and print a sequence of 10 random numbers.  Each random number should be an integer in the range from


0 to 100, inclusive (that means both 0 and 100 should have a chance of appearing). I do not expect you to implement your own random number generator. I expect you to use the standard way of obtaining randomness in a secure fashion.


$ ./grand


56 77 91 2 33 40 72 100 6 2


Augment your program to take a command line parameter specifying how many random numbers to generate. That is, if grand is invoked by:


$ ./grand 4


it will output 4 random numbers from 0 to 100, inclusive. Make sure your program does something sensible if the supplied argument is not a valid integer. There should not be an arbitrarily imposed upper limit to this number (in other words, do not have an artificial cap on the value of the argument).


Since it is easy to forget how to use programs, it is often useful to provide a well-known command line switch (or parameter) that tells the user how to invoke the program. Augment your program to recognize two more command line arguments, '-h' and '--help' that prints out the usage information for the program. For example,


$ grand -h


and


$ grand --help


should output the following usage information:


grand [-h | --help]       : output this usage message.


grand [n]                 : print out n random integers in [0,100]


Finally, augment your program to print out its version. Don't forget to add this usage case to your help dialog.


$ grand –version OR -v


grand-0.0.3


1) Functions and Recursion (50 pts)


Experiment with recursion. The Fibannaci sequence is a famous naturally recursive series of numbers whose ratio approaches the Golden Ratio.


f(n) = f(n-1) + f(n-2)


Implement a program named 'fib' that uses recursion to calculate and print the first n Fibannaci numbers, where 'n' is less than or equal to 30.


Usage:


fib [n]


For example, 'fib 4' should output:


fib(0) = 1


fib(1) = 1


fib(2) = 2


fib(3) = 3


fib(4) = 5


Modify your program so that providing the --target or -t option will print only the nth Fibannaci number.


$ ./fib --target 3


fib(3) = 3


Add the ability for your program to calculate the Fibannaci sequence iteratively rather than recursively. Output should not change. If you execute your program with the name 'ifib' then it performs the iterative calculation.  If it is executed via 'rfib' or 'fib' it performs the recursive method of calculating.


$ ./fib --target 3


fib(3) = 3


$ ./ifib --target 3


fib(3) = 3


$ ./rfib --target 3


fib(3) = 3


There is an example of how to accomplish this sort of test of the program name in “C Programming Language, 2nd Edition, by Brian W. Kernighan, Dennis M. Ritchie” textbook. You can search Google for an iterative version of Fibannaci, but be sure to cite where you found it in your README.


Note:


You may want to consider using GNU getopt library for processing command line options.

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

Smart Homework Helper
Peter O.
Assignment Hub
Math Specialist
Writing Factory
University Coursework Help
Writer Writer Name Offer Chat
Smart Homework Helper

ONLINE

Smart Homework Helper

Greetings! I am the professional electrical, telecom engineer, rich experience in QPSK, OFDM, FFT, such signal processing concetps with matlab, I can satisfy you definitely. more in chat.thanks.

$35 Chat With Writer
Peter O.

ONLINE

Peter O.

Hi, I am an MS Research Scholar, and after carefully reading the description of the project I can confidently say that I am a suitable candidate, equipped with right skills, to complete this valuable task of yours. I assure you timely completion, originality and grammatically correct content, according to your needs. Please feel free to contact me for completion of this task. Thank you very much.

$40 Chat With Writer
Assignment Hub

ONLINE

Assignment Hub

I feel, I am the best option for you to fulfill this project with 100% perfection. I am working in this industry since 2014 and I have served more than 1200 clients with a full amount of satisfaction.

$35 Chat With Writer
Math Specialist

ONLINE

Math Specialist

I am a specialist in MATHS with having 12 years of experience. I can help you with Maths, Stats, Algebra and Calculus within very short amount of time. Please check my reviews,rating and samples to check my skills and level.

$35 Chat With Writer
Writing Factory

ONLINE

Writing Factory

I can help you with creating a presentation of one slide for The Word of William Hunter. I will be happy to offer you 100% original work with high-quality standard, professional research and writing services of various complexities.

$5 Chat With Writer
University Coursework Help

ONLINE

University Coursework Help

Greetings! I’m very much interested to write for attendance systems. I am a Professional Writer with over 5 years of experience, therefore, I can easily do this job. I will also provide you with TURNITIN PLAGIARISM REPORT. You can message me to discuss the details.

$20 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

Acid and base titration - Need a rewrite on purchasing &Vendor Management week two - Parenting with love and logic book review - 4 ratings icon set excel - Diles a los voluntarios que vengan también - What is self reference criterion - Meta Themes Draft - Vce methods grade distribution - Journal entry 15 on course - Ahead of its time notpron - Describe one characteristic of a disaster recovery team member. - Sonnet 73 is written in iambic pentameter - 2 identify and document key nursing diagnoses for jennifer hoffman - A scholarly source has which of following attributes - What is an eportfolio - Blade and soul climbing to greater heights quest - Biology for dummies cheat sheet - Topic: The League of Iroquois Constitution and Government - Discussion Question - Bhopal disaster ethical issues - Unit IV assignment - The President, the Congress, and the Economy - Thermodynamics enthalpy of reaction and hess's law lab calculations answers - All type ((*+91-9829866507*)) love problem solution molvi ji - Apple's ecosystem - Food truck catering contract - Mickey monus today - Roles of employer associations - 2 address instruction example - Qualitative Research Designs - Samsung electronics uk ltd - History of California-3 - Abc model of crisis intervention papers - Iec class 3 wind turbines - Discussion - Mcdonalds hamburger stools for sale - Given a cyclohexane framework in a chair conformation - Pollan botany of desire pdf - Plain Language Writers ONLY - Leyburn sprints track layout - Pew research center's internet and american life project - Basic Data Analysis in RStudio - How values affect choices - Student integrity - Assignment Due 10/05/2020 APA Format Power Point!! - Does honeywell stock pay dividends - Themes of the great depression - Qc levey jennings chart - The walt disney company the entertainment king case answers - Adónde 1 ustedes de vacaciones - Http go lifetime com streamline poleassembly - Crushed diamond accessories wholesale - How to connect blueparrott b350 xt - Simplex company has the following estimated costs for next year - Lily's nails potters bar - Ib chemistry topic 9 - To download lame and ffmpeg for windows - Chemistry - Mla format informative speech outline - How to check pvdm on cisco router - Steve ballmer windows 1.0 commercial - Your mom knows nike shirt meaning - Reflection - Collective noun for yachts - Barclays exchange rate dollar to pound - Endeavour energy technical review request - Who wrote all my sons - English - Neutralization of acids and bases lab answers - Discovery series org q0208 - Political context of othello - What evidence can you cite that galactic cannibalism really happens - Malus ioensis 'plena growth rate - Can chlorine kill fish - Woolworths insurance car contact - Geraint jones coventry university - Nutrition Discussion - DiscussionB 7-1 - Egyptian god of revenge - Error code 403 40316 - Are toxins involved in set point theory - Cases in operations management robert johnston pdf - Bsbfim501 assessment task 1 - The pirate cruncher powerpoint - Great spirits have always encountered violent opposition meaning - Active Directory GPO and MBSA - Important facts about cleopatra - How to cite clifton strengthsfinder assessment apa - Nova the big energy gamble worksheet answers - RE - A mixture of methane and ethane of mass 13.43 - Need help in writing book review by chapter - Hokie hokie hokie hi - Back to reality eminem - Give me liberty history textbook - FIN/571: Corporate Finance - Promotional mix coca cola - Naeyc standards and key elements - History - Picot statement and literature search gcu - Assignment 09/28