Assignment 4 v3
#include <stdio.h>
#include <math.h>
int main(void)
{
long long a;
long long b;
long long c;
long long d;
int year;
scanf("%lld %lld", &a , &b);
c=a;
d=b;
a*=b;
printf("multiplication is %lld\n", a);
a=c;
d=b;
a+=b;
printf("addition is %lld\n", a);
a=c;
d=b;
b-=a;
printf("large minus small is %lld\n", b);
a=c;
d=b;
b/=a;
printf("The large number divided by the small number is %lld\n", b);
a=c;
d=b;
printf("The square root of both large and small numbers are %lld and %lld\n", sqrt(a), sqrt(b));
a=c;
d=b;
printf("The cubic roots of the small and large numbers are %lld and %lld\n", cbrt(a), cbrt(b));
a=c;
d=b;
b%=a;
printf("Remainder of the division by large by the small%lld\n", b);
scanf("%d", &year);
if(((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) {
printf("It is a leapyear");
}
else
{
printf("It is not a leapyear");
}
return 0;
}
|
run
| edit
| history
| help
|
0
|
|
|