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

Analysis of poverty and crime - Pediatric well child soap note example - Similarities between egypt and philippines culture - Is a equilateral triangle a parallelogram - Hume libraries vic gov au - Simile quotes in romeo and juliet - Themes in lady lazurus - How big should the hole in a parachute be - Greedy smith love harmonica - Here is the assignment due 24 hours - Caterpillar tunneling revitalizing user adoption of business intelligence pdf - Experiment to determine the percentage of copper in brass - Provide extensive additional information on the topic Explain, define, or analyze the topic in detail and Share an applicable personal experience - Metal casket single top split lid cover - Case Study-5 - Critical thinking game plan example - Social impact of technology assignment 8 - What is data roaming in australia - 200 word response post in regards to the prompt and the attached ppts in google links and article attached - Types of industry sectors - How to draw a soda can - Biology - Responsibility accounting reports for profit centers will include - Discussion - Student exploration titration gizmo answer key activity c - Illinois state university kinesiology - Tim o brien the things they carried essay - Rule thirty four website - Exchange rate shifts that cause the sing - The redistricting game mission 4 solution - Identify the electrophilic site in the following molecule - Writing an essay - Course Project Overview - Stakeholder register and Communications Management table - Marketing Draft_2 - New york state bureau of ems - Chapter7 - GA: CPS : - Ohmyhandbags - What are the trends in the periodic table worksheet answers - Ain t ia woman cicely tyson - Bupa change of details form - American jesus stephen prothero chapter summaries - Care certificate standard 8 answers - A first course in linear algebra by k kuttler - Mid square method in hashing - Go float electric boat for sale - Equal opportunities policy template - How to do a webliography - Business partnership proposal pdf - Single celled organisms who pump out water are engaging in - The tin pan alley era lasted from 1950 to 1967 - When i heard the learn d astronomer questions and answers - Xenonstack wikipedia - Clark rubber marine vinyl - North american reggio emilia alliance - Geberit mepla installation guide - Budgeted cash disbursements for merchandise purchases - Philosophy discussion - How to write a plaafp - Speak hands for me - Emirates annual report 2012 - The cone gatherers summary of chapters - How to write a police incident report - Bs1361 short circuit capacity - Peer responses - Punnett square practice worksheet answers - System specification document template - Marine plastic pollution in asia - Melting point of tetradecanol - How to unlock the gate in gilead - Zeek the geek online - Anton piller kg v manufacturing processes ltd 1976 ch 55 - Does frances swaggart wear a wig - Twisted pair cable types and uses - 7 ludeman drive wollert - Chicago style sample paper - Urgent - Horse attacking human dream - G.2 - Introduction to criminal justice bohm 8th edition - Stakeholder management and communication plan - Pros and cons of clinical decision support systems - Market architecture case study - 55 minutes in decimal - Assurance services involve all of the following except - PSY 5107 Week 4 – Assignment: Customize Potential Research Questions and Hypotheses - Eunice mary kennedy shriver - Discussion Board - 360g2 cassette 12 lc sm bl pigtails - 2004 3u hsc solutions - MKT/421T - Marine radio operators handbook - "Eight Concerte Steps" Poem - Scope of service level management process covers - Krumboltz theory of career choice - Bowen family day care - Econometrics - Business objects 5.1 9 - For each of the following pairs which bond would you expect to pay a higher interest rate - Table 3 dichotomous key results