#define _CRT_SECURE_NO_WARNINGS \\ calculate the age
#include <stdio.h>
#include <stdlib.h>
int main () {
int Y0, M0, D0;
printf ( "Please enter your date of birth: \ n");
scanf ( "% d% d% d", & Y0, & M0, & D0);
printf ( "this man's birthday is% d year% d month% d day \ the n-", Y0, M0, D0);
int y1, M1 , D1;
the printf ( "enter current date:");
Scanf ( "% D% D% D", & Y1, & M1, & D1);
int Age;
Age = Y1 - yO;
IF (M1 - M0>. 6) {
Age = Age +. 1;
}
the printf ( "the person's age D%", Age);
System ( "PAUSE");
return 0;
}
_CRT_SECURE_NO_WARNINGS #define
#include <stdio.h>
#include <stdlib.h> // write a program obtained quotient and the remainder thereof
int main () {
int I, J;
the printf ( "Enter two digits:") ;
Scanf ( "% D% D", & I, & J);
int A;
A = I / J;
int B;
B = I% J;
the printf ( "A =% D \ Nb =% D \ n-", A , B);
System ( "PAUSE");
return 0;
}
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
int main(){
double a, b, c;
printf("输入三个两位小数的数:");
scanf("%lf%lf%lf", &a, &b, &c);
double d;
d = (a + b + c) / 3;
printf("d=%lf\n", d);
system("pause");
return 0;
}
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>\\交换三个数
#include<stdlib.h>
void main(){
int a, b, c;
printf("请输入三个数子:");
scanf("%d%d%d", &a,&b,&c);
printf("a=%d,b=%d,c=%d\n", a, b, c);
int n; int m; int t;
n = a; m = b; t = c;
a = b; b = c; c = a;
b = n; c = m; a = t;
printf("a=%d,b=%d,c=%d", a, b, c);
system("pause");
return 0;
}