Sha256: 964ad391272b456720217abcf1f0bb501ad596908c32dac2de7e67f139b96d91
Contents?: true
Size: 448 Bytes
Versions: 10
Compression:
Stored size: 448 Bytes
Contents
# Maybe you need to import the mathematical funcions # from Tcl with: # eval("namespace path ::tcl::mathfunc"); void main() { int a, b; puts("Enter two integers:"); a = (int)(gets(stdin)); b = (int)(gets(stdin)); puts("${a} + ${b} = ${a+b}"); puts("${a} - ${b} = ${a-b}"); puts("${a} * ${b} = ${a*b}"); puts("${a} / ${b} = ${a/b}, remainder ${a%b}"); puts("${a} to the power of ${b} = ${(int)pow(a,b)}"); }
Version data entries
10 entries across 7 versions & 1 rubygems