• 博客(0)
  • 资源 (2)

空空如也

数据库系统概论王珊第四版答案

数据库系统概论王珊第四版答案 数据库系统概论王珊第四版答案

2011-10-20

113道C语言题目

1.输入两个正整数,m和n,求其最大公约数和最小公倍数。 #include<stdio.h> void main() { int hcf(int,int); /*函数声明*/ int lcd(int,int,int); /*函数声明*/ int u,v,h,l; printf("Please input two numbers:\n"); scanf("%d,%d",&u,&v); h=hcf(u,v); printf("H.C.F=%d\n",h); l=lcd(u,v,h); printf("L.C.D=%d\n",l); } int hcf(int u,int v) { int t,r; if(v>u) {t=u;u=v;v=t;} while((r=u%v)!=0) {u=v;v=r;} return(v); } int lcd(int u,int v,int h) { return(u*v/h); } 2.输入一行字符,分别统计出其中字母、空格、数字和其他字符的个数。 #include<stdio.h

2011-10-17

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除