Changeset 935315d
- Timestamp:
- May 22, 2017, 9:56:39 AM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 13099105, eb182b0
- Parents:
- 18c55e1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/gmp.c
r18c55e1 r935315d 10 10 // Created On : Tue Apr 19 08:55:51 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon May 22 0 8:55:09 201713 // Update Count : 53 612 // Last Modified On : Mon May 22 09:05:09 2017 13 // Update Count : 538 14 14 // 15 15 16 16 #include <gmp> 17 17 18 int main( ) {18 int main( void ) { 19 19 sout | "constructors" | endl; 20 20 short int si = 3; … … 76 76 fn = 1; fn2 = fn1; fn1 = fn; // 2nd case 77 77 sout | 1 | fn | endl; 78 for ( int i = 2; i <= 200; i += 1 ) {78 for ( unsigned int i = 2; i <= 200; i += 1 ) { 79 79 fn = fn1 + fn2; fn2 = fn1; fn1 = fn; // general case 80 80 sout | i | fn | endl; … … 87 87 fact = 1; // 1st case 88 88 sout | (int)0 | fact | endl; 89 for ( int i = 1; i <= 40; i += 1 ) {89 for ( unsigned int i = 1; i <= 40; i += 1 ) { 90 90 fact = fact * i; // general case 91 91 sout | i | fact | endl;
Note: See TracChangeset
for help on using the changeset viewer.