Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
15
Task/Arithmetic-Integer/Little/arithmetic-integer.little
Normal file
15
Task/Arithmetic-Integer/Little/arithmetic-integer.little
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# 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)}");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue