cProgHWFactorial - long int old=1 long int older=0 int k...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
C PROGRAMMING HOMEWORK “FACTORIAL+ LONG MAX” /****************** Homework # 7 Part1 Factorial+long_max by: ******************/ #include <stdio.h> #include <stdlib.h> #include <tools.h> #include <limits.h> int main(void) { long int current;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: long int old=1; long int older=0; int k; for(k=0;k<LONG_MAX;++k){ current=old+older; printf("%ld\t",current); older=old+current; printf("%ld\t" , older); old=current+older; printf("%ld\t" , old); } }...
View Full Document

This note was uploaded on 03/30/2008 for the course CS 212 taught by Professor Dr.frey during the Spring '06 term at New Haven.

Ask a homework question - tutors are online