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

You re the psychologist worksheet answers - Organizational behaviour topics for presentation - Content process product examples - Essay - Acts inductive bible study - Maruti suzuki conflict case study - Exp 105 final assignment paragraph 4 - Finance midterm - Red lotus of chastity - Sanger belongs to which caste - Cisco asr1001 x ios upgrade procedure - Airport service agent emirates - Discussion post research question/problem using PICOT format - Bus/475 - Electron configuration of sulfur - 10 essential skills for classroom management - Time of flight mra - Heinz ketchup pricing the product line case solution - How to make cyclohexane with model kit - University of rhode island change assessment urica - Dragon fruit marketing plan - Describe the importance of effective communication in the correctional setting - Color blindness from mother or father - The consumer rises (WWII and Its Aftermath, Broadcast Networks & Early Pop Culture) - Infant observation paper - General lab safety experiment 1 neutralization of acids and bases - Your response is off by a multiple of ten webassign - Blood brothers key quotes and analysis - Fair and lovely advertisement in english - D2 - Residential property lending strand - Factors affecting location decision ppt - Set builder notation to interval notation - 3 types of rational numbers - Teresa bentham passion beyond imagination - Marketing communications discovery creation and conversations ebook - Globesmart cultural dimensions - Hotels near taylor university - Molecular systems biology journal - ESSAY - Joe friday quiz 166 - Production and operations management assignment pdf - Information Technology - Of mice and men essay questions and answers - Queensland number plate search - Zip hydrotap installation manual - Tjc edu apache access - Circuit breaker discrimination guide - Stellawood cemetery death records - A mercury manometer is connected to a large reservoir - MIS DS 3. - Right this minute ipad mini giveaway buzzword 2017 - What makes ice melt faster data table - Flinders harvard reference guide - How to report manova results from spss - Thin film oil slick mastering physics - Expected return without probability - How much does a 100 ml beaker weigh - Metals and acids reaction - 39 rm williams drive walkley heights - Ethical Decision Making - Arch test eviews interpretation - Kirchhoff's voltage law khan academy - The transactional model of communication supports - Patrick the human resources manager at acme company - Ms project 7 day work week - Discussion 1 - Developmental psychology test questions - Simple stain vs gram stain - Qnt 351 week 1 statistics in business - Thomastown recreation & aquatic centre - Marquis motorhomes hampshire southampton - Research paper - BUSN 602 Week 8 forum - Research paper. - Holistic perspective anthropology - Chromagen free hot water system - Hrm 300 week 5 trends in hr management analysis - Electron configuration practice chemistry - Bohemian rhapsody hidden meaning - Mail clerk pay scale - Should everyone go to college they say i say questions - The mirror newspaper myanmar pdf - Project s has a cost of $10000 and is expected - Qnt 351 quantitative analysis for business - Voltage variation in india - Ellos compran una calculadora - SOCW 6090 - Discussion: Applying Differential Diagnosis to Neurodevelopmental Disorders - Make bar graphs lesson 2.5 answer key - How to put tennis balls in a baseball bathow to put tennis balls in a baseball bat - Case 9C Lakeside Inn - Good palliative geriatric practice algorithm - Pharmacology - Information Systems - Is reaction time a systematic error - Leadership newsletter article template - Society and culture hip hop notes - Infotech it management & governance framework - Empirical Project - Bsbmgt517 manage operational plan