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

What does the dialysis tubing represent - Cliff keen kickoff classic results - Observing osmosis plasmolysis and turgor in plant cells - Vanilla coke and mentos - Define duty of care - Islamic culture ISLAM IN AMERICA - Healthcare policy in the US - Power amplifier efficiency calculation - Theories of punishment - I need 300 words essay in sex film - Rsch 8110 week 4 - Discussion - First person to reach south pole - What event preceded the rampant use of steroids in major league baseball? - 0.1 m sodium carbonate - Paradox in act 1 scene 1 of macbeth - How to calculate cash discount and trade discount - Marine engineering curriculum philippines - Cincinnati zoo and botanical garden case study - Lobe of the cerebrum controls motor functions - Lab 8, Day 3: SDS-PAGE Data Analysis - Oft agency agreement fact sheet - Public Safety and Individual Rights Paper - Southwestern university stadium construction case study - Managing transaction exposure chapter 11 - A philip randolph apush - Learning focused schools lesson plan template - What are the defining characteristics of the phylum porifera - Subject of a life definition - Disk Image - 2m2 resistor color code - The gambler who blew $127 million - Cosi louis nowra quotes - Segmentation criteria used in identification for lemonade - Advanced pathophysiology practice questions - Sam hughes margaret olley - Ipad target market and demographics - Freeman brown private school - The Medieval Period - Who discovered oxygen in 1774 - The writer of the gospel of john identifies himself only as “the disciple jesus loved.” - The family games case deals with the following accounting issue: - 7 1 final project part one submission critical analysis portfolio - Coffee cup calorimetry lab answers - Sonnet 43 elizabeth barrett browning analysis - The ethics of dissent managing guerrilla government pdf - Daily mood chart therapist aid - Bus routes in townsville - Hpi soap note example - Lactase enzyme lab data sheet answers - What are the sides of the dna ladder made of - Find the best point estimate of the population proportion p - Cereal box names ideas for project - What is the future of strategic planning and management personnel in a business environment? - Rainford christmas tree land - Describe the compensation philosophy of maersk - Differentiated nursing practice - Work within legal and ethical framework - Jean-auguste-dominique ingres’s portrayal of the woman in grande odalisque ________ her body. - Literature evaluation table - Campbellsville university niche - American greetings case - Qsuper tfn for ato - Ethics for the new millennium sparknotes - 1769 l19er bb1b user manual - Impediments to problem solving - How to calculate potential difference - Discussion 6B - Letham mains primary school - Figurative language in the song hall of fame - Sea company reports the following information regarding its production cost - Assignment help - Hum worksheet cultures and artifacts - Gta 5 motion sensor function - Nick scali byron tv unit - Rj45 connector color code - Next please analysis - All of the different perspectives in psychology answers com - Outline for effective speaking - East ham bus garage - Visio sequence diagram template - Leadership Foundation/Critical and Creative Thinking - Pleasures of eating wendell berry - What is albert pujols saying in the stubhub commercial - In the double reduction gear train shown - Biointeractive lizard evolution virtual lab answers - Nib ambulance only cover - Apa citation for silver linings playbook - Hom herbalife 2018 ppt - Merchant of venice criticism - Agency - Field hockey attacking tactics - Irish guards pipers uniform - The teller at the bank with brown hair - The wolf the moose and the fir tree answers - How to make a putt putt boat go faster - How to construct an ecomap - Shadow health tina jones musculoskeletal - Health education - Point loma nazarene university essay prompt