1.
#include<stdio.h>
#include<math.h>
#define PAI 3.1415926
int main(void){
float a,x,y;
scanf("%f %f",&a,&x);
y=sin(x)/(a*x)+fabs(cos((PAI*x)/2));
printf("%.3f",y);
return 0;
}
2.
#include<stdio.h>
int main( ){
char ch;
ch=getchar();
printf("%c%c%c\n",ch-1,ch,ch+1);
return 0;
}
#include<stdio.h>
int main( ){
int x;
scanf("%c",&x);
printf("%c%c%c\n",x-1,x,x+1);
return 0;
}
3.
#include<stdio.h>
int main(void){
float C,F;
scanf("%f",&C);
F=9/5.0*C+32;
printf("%.3f\n",F);
return 0;
}
4.
#include<stdio.h>
#include<math.h>
int main(void){
int x,y,a,b,c,d,e;
scanf("%d%d",&x,&y);
a=x+y;
b=x-y;
c=x*y;
d=x/y;
e=x%y;
printf("%d %d %d %d %d",a,b,c,d,e);
return 0;
}
5.
#include<stdio.h>
#include<math.h>
int main(void){
float x,y,z,A,B,C,D,d;
scanf("%f%f%f",&x,&y,&z);
scanf("%f%f%f%f",&A,&B,&C,&D);
d=fabs(A*x+B*y+C*z+D)/sqrt(A*A+B*B+C*C);
printf("%.3f\n",d);
return 0;
}
6.
#include<stdio.h>
#include<math.h>
int main(){
int a,b,c,d;
scanf("%d",&a);
b=a/3600;
b=b%24;
c=(a%3600)/60;
d=a%60;
printf("%02d:%02d:%02d",b,c,d);
return 0;
}