{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Project2CComputing

# Project2CComputing - proj 2 problem 1.c and proj 2 problem...

This preview shows pages 1–2. Sign up to view the full content.

George Washington University Department of Computer Science CSCI 1121 Introduction to C Computing Spring 2011 Programming Project 2 DUE on March 18, 2011 before 11:59PM 1. Taylor series: 1. Problem statement: Write a program to compute the value of e x by using the following formula: e x = 1 + x 1! + x 2 2! + . . . + x n n ! (1) The n and x in the formula are entered by the user, the estimate for e x should be printed to the screen. 2. Background: The factorial of a nonnegative integer n is written n ! (pronounced n factorial) and is deﬁned as follows: n ! = n · ( n - 1) · ( n - 2) . . . 1 (2) and 0! = 1 (3) For example, 5! = 5 · 4 · 3 · 2 · 1. Factorials will be used to estimate e x using formula Eq. 1. 3. Hint: Use long instead of int when deﬁne the variables. 2. Pyramid: Problem statement: Write a program to construct a pyramid of numbers as follows: 1 1 2 1 12 3 21 . . . . . . 12345678 9 87654321 The pyramid should be printed to the screen. 3.Submission: All projects will be submitted on Blackboard on the class web-page. Under Projects. Name your ﬁles

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: proj 2 problem 1 .c and proj 2 problem 2 .c and attach them on Blackboard. Make sure you include the following comments at the beginning of each ﬁle: / * Student name : * email : * Assignment name : * program description : 1 * / Projects who don’t meet these basic requirements will be penalized 20% . Late assignments will not be accepted. 4. Cheating: You are not allowed to collaborate with other students in solving this assignment. Every student has to come up with his/her own solution. If you have any questions talk to your lab assistant. Any cheating (e.g. copying from internet, other students, or providing someone’s else solution) is a serious violation of the University student code and will be dealt with very seriously. GOOD LUCK!!! 2...
View Full Document

{[ snackBarMessage ]}

### Page1 / 2

Project2CComputing - proj 2 problem 1.c and proj 2 problem...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online