摘要:
#include "stdio.h" #define N 50 long fun(char *s) { int i,t; long sum=0; for(i=0;s[i];i++) { if(s[i]>='0'&&s[i]<='9')//当字符是'0'--'9'时,*-‘0'就行了 t=s[i]-' 阅读全文
摘要:
1949年的国庆节(10月1日)是星期六。今年(2012)的国庆节是星期一。 那么,从建国到现在,有几次国庆节正好是星期日呢? 1 # include <stdio.h> 2 int yday(int year); 3 int main(void) 4 { 5 int year; 6 int n; 阅读全文
摘要:
#include<stdio.h> #include<stdlib.h> #define MAXINE 100 int main(void) { int j,i; int n; int a[MAXINE][MAXINE]; printf("Enter n:"); scanf("%d",&n); a[ 阅读全文