Changes in examples/square.c [200fcb3:73abe95]
- File:
-
- 1 edited
-
examples/square.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
examples/square.c
r200fcb3 r73abe95 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Dec 11 23:28:24 201813 // Update Count : 2 812 // Last Modified On : Tue Mar 8 22:05:48 2016 13 // Update Count : 27 14 14 // 15 15 … … 23 23 int main() { 24 24 #if 0 25 sout | "result of squaring 9 is " ;25 sout | "result of squaring 9 is " | endl; 26 26 27 27 // char does not have multiplication. … … 30 30 } // ?*? 31 31 char c = 9; 32 sout | "char\t\t\t" | square( c ) ;32 sout | "char\t\t\t" | square( c ) | endl; 33 33 34 sout | square( s ) ;34 sout | square( s ) | endl; 35 35 #endif 36 36 short s = 9; … … 38 38 #if 0 39 39 signed int i = 9; 40 sout | "signed int\t\t" | square( i ) ;40 sout | "signed int\t\t" | square( i ) | endl; 41 41 42 42 unsigned int ui = 9; 43 sout | "unsigned int\t\t" | square( ui ) ;43 sout | "unsigned int\t\t" | square( ui ) | endl; 44 44 45 45 long int li = 9; 46 sout | "signed long int\t\t" | square( li ) ;46 sout | "signed long int\t\t" | square( li ) | endl; 47 47 48 48 unsigned long int uli = 9; 49 sout | "unsigned long int\t" | square( uli ) ;49 sout | "unsigned long int\t" | square( uli ) | endl; 50 50 51 51 signed long long int lli = 9; 52 sout | "signed long long int\t" | square( lli ) ;52 sout | "signed long long int\t" | square( lli ) | endl; 53 53 54 54 unsigned long long int ulli = 9; 55 sout | "unsigned long long int\t" | square( ulli ) ;55 sout | "unsigned long long int\t" | square( ulli ) | endl; 56 56 57 57 float f = 9.0; 58 sout | "float\t\t\t" | square( f ) ;58 sout | "float\t\t\t" | square( f ) | endl; 59 59 60 60 double d = 9.0; 61 sout | "double\t\t\t" | square( d ) ;61 sout | "double\t\t\t" | square( d ) | endl; 62 62 63 63 long double ld = 9.0; 64 sout | "long double\t\t" | square( ld ) ;64 sout | "long double\t\t" | square( ld ) | endl; 65 65 #endif 66 66 } // main
Note:
See TracChangeset
for help on using the changeset viewer.