博文

学生成绩管理系统(2005-09-21 23:49:00)

摘要:/*第三方函数库: SGCHN3.0*/
/*该库函数的的一些函数说明
/*  C Head File.

    SGCHN30.h

    Definitions for SGCHN3.0 Run time Library Function.

    Copyright (c) 2004, 2005 SGPRO
    All Rights Reserved.

    Autor: YinShengge 作者: 殷圣鸽

    Version: 3.0
    Build Time: 2004 - 4

    Maintain Time: 2005-5-14
    Maintain Time: 2005-5-19  
*/

extern void  SGCHNinit();
extern char  *getsgchnversion();   /*获得SGCHN版本*/  
extern int   scanformat(char *formats, ...);    /*控制台格式输入  与scanf类似*/
extern int   print(char *formats,...);          /*控制台格式输出  与printf类似*/
extern int &nbs......

阅读全文(9962) | 评论:7

c++(最大公约数和最小公倍数)(2005-09-21 23:48:00)

摘要:#include<iostream>
using namespace std;
int main()
{
    int m=0,n=0;
    cout<<endl
        <<"请输入两个数(整型,从小到大):";
    cin>>n>>m;
    while(n>m)
    {
        cout<<endl
            <<"输入格式错误,请重新输入.:";
        cin>>n>>m;
    }
    int m1=m;
    int n1=n;
    int i=m%n;
    while(i!=0)
    {
        m=n;
        n=i;
        i=m%n;
    ......

阅读全文(4132) | 评论:1

c++(冒泡排序)(2005-09-21 23:48:00)

摘要:#include<iostream>
#define swap(x,y,t)((t)=(x),(x)=(y),(y)=(t))
using namespace std;
const int N=10;
void sort(int b[],int count);
int main()
{
    int a[N];
    cout<<endl
        <<"please input the "<<N<<"numbers:"<<endl;
    for(int i=0;i<N;i++)
        cin>>a[i];
    cout<<endl
        <<"the original numbers you have inputed are: "<<endl;
    for(i=0;i<N;i++)
    cout<<" "<<a[i];
    cout<<endl
        <<"After sorting the numbers ,the numbers are:"<<endl;
    sort(a,N);
    return 0;
}
voi......

阅读全文(8230) | 评论:0