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

Institutionalized organizations formal structure as myth and ceremony - 175 bus route brisbane - What can you do to encourage collaboration and demonstrate stewardship - Bell b30e fault codes - Cost constraint on useful financial reporting - Reserve for Madem_Jennifer - Equine tafe courses wa - What happens on a river bend - Security - Strategic staffing at chern's a case study - CSCI 457 Assignment 2 – Hexadecimal Calculator - Chinese lion dance meaning - Nova labs cyber security - Swot analysis strengths examples for students - Brisbane city council gym green square - Margaret newman theory of health as expanding consciousness - Ron goldman crime scene - Diversity - Strata by-laws wa pdf - Non union fortune 100 companies - Literature Review Paper - Ode to autumn theme analysis - Perth 190 visa requirements - So42- to so2 half equation - The following events occurred for johnson company - African American Literature journal - Written assignment-Reflection - Hackr.io - The pardoner's tale questions answer key - Sustainability at holland america line - Costco wholesale corporation case study - Consider the circuit shown in figure 1 - Xor neural network matlab - The goal eliyahu goldratt summary - Operational excellence organizational structure - Week 1 Homework MAT - Ob case study with solution pdf - 91c william street norwood - Bradford grammar term dates - Wanttoknowit com who invented the candy cane - Long distance walkers association - Application of trigonometry in engineering - Who's ready for deforestation? - Https icampus strayer edu student homepage - Igcse biology reproduction past papers - Mitsubishi electric quick clean kit - Chaucer uses the pilgrimage primarily as a device to - Uniformly accelerated linear motion conclusion - Safety of genetically engineered foods persuasive speech - Reflective journal on classroom management - Johnson and johnson wellness program - Macbeth acts 1 3 test answer key - A glass sphere with a radius of 15.0 cm - Into the wild phrases - How to report pairwise comparisons apa - Singapore polytechnic optometry centre - HR Challenge: Hire From Within or Outside? - The fur coat full short story - Discussion Question- White Paper - Dolan company accounting records reflect - Maximum voltage drop for lighting - Cost of Capital - Dead poets society conformity - Kelly's personal construct theory emphasizes the notion that - Green computing report - The pura principle summary - Engineers want to design seats in commercial aircraft - Ato division 293 release authority form - How to solve postfix and prefix expression - The number of employees in hcl enterprise is about - A class divided video questions answers - Iteco truck wash 500 price - Journal of experimental agriculture international predatory - Ethics and accountability in public administration - Amdocs order management system - 118 elements name and symbol - Metastructures of nursing informatics - Opening statement for selection criteria - Restaurant management system project report doc - Role performance model of health - Endurance gb south west - Mcafee hips supported platforms - Components of just in time system - Well cultivated critical thinker - Marketing Global - Merger and acquisition notes for mba - Communicating in groups applications and skills 10th edition - Small arms school corps comrades association - Ucumberlands blackboard login - Panera bread closest rivals - Radiometric dating game - What are the aspects of communication - FINANCING NEW VENTURES - A39 belt cross reference - Klumper corporation is a diversified - Racv pre purchase inspection - Www chemsheets co uk answers - Reply - Ib chemistry bonding questions - Health finance week 5