Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
coding!!Woo!!
//gcc 5.4.0 #include <stdio.h> #include <math.h> int main(void) { //This code calculates arithmetic functions using L, a large integer, and S, a small integer long int L=1000; int S=10; long int sum; long int product; long int difference; long int result; long int remainder; double squarerootL; double squarerootS; double cubicrootL; double cubicrootS; sum= L+S; product= L*S; difference= L-S; result= L/S; remainder=L%S; squarerootL=sqrt(L); squarerootS=sqrt(S); cubicrootL=cbrt(L); cubicrootS=cbrt(S); printf("the sum is %Ld \n", sum); printf("the product is %Ld \n", product); printf("the difference is %Ld \n", difference); printf("the result is %Ld \n", result); printf("the remainder of L divided by S is %Ld \n", remainder); printf("the squareroot of L is %Lf \n", squarerootL); printf("the squareroot of S is %Lf \n", squarerootS); printf("the cubicroot of L is %Lf \n", cubicrootL); printf("the cubicroot of S is %Lf \n", cubicrootS); return 0; }
run
|
edit
|
history
|
help
0
a3
Lab 11
20171103_factorial
purple ghost red orange blue skulls
printf
CO Assignment 1 Question 4
Program to input form command line and print it
pointer example 2
-Wfloat-conversion
20171127_ARRAY_PRIMOS