博文

余弦函数(2006-05-08 18:03:00)

摘要: 函数名: cos 功  能: 余弦函数 用  法: double cos(double x); 程序例: #include <stdio.h> #include <math.h> int main(void) {    double result;    double x = 0.5;    result = cos(x);    printf("The cosine of %lf is %lf\n", x, result);    return 0; } ......

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

计算复数的绝对值(2006-05-08 17:41:00)

摘要: 函数名: cabs 功  能: 计算复数的绝对值 用  法: double cabs(struct complex z); 程序例: #include <stdio.h> #include <math.h> int main(void) {    struct complex z;    double val;    z.x = 2.0;    z.y = 1.0;    val = cabs(z);    printf("The absolute value of %.2lfi %.2lfj is %.2lf", z.x, z.y, val);    return 0; } ......

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

十进制转化成二进制(2006-05-08 17:39:00)

摘要:#include"stdio.h"#define N 100void main(){ int i,x,k=0,r,b[N]; printf("input x (10jinzhi):  "); scanf("%d",&x); do {  r=x%2;  b[k++]=r;  x/=2; }while(x); printf("output b(2jinzhi)\n\t"); for(i=k-1;i>=0;i--)  printf("%d",b[i]); printf("\n");}......

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

注册终止函数(2006-05-08 17:26:00)

摘要:函数名: atexit 功  能: 注册终止函数 用  法: int atexit(atexit_t func); 程序例: #include <stdio.h> #include <stdlib.h> void exit_fn1(void) {    printf("Exit function #1 called\n"); } void exit_fn2(void) {    printf("Exit function #2 called\n"); } int main(void) {    /* post exit function #1 */    atexit(exit_fn1);    /* post exit function #2 */    atexit(exit_fn2);    return 0;......

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

在给定半径以(x, y)为圆心画圆(2006-05-08 17:24:00)

摘要: 函数名: circle 功  能: 在给定半径以(x, y)为圆心画圆 用  法: void far circle(int x, int y, int radius); 程序例: #include <graphics.h> #include <stdlib.h> #include <stdio.h> #include <conio.h> int main(void) {    /* request auto detection */    int gdriver = DETECT, gmode, errorcode;    int midx, midy;    int radius = 100;    /* initialize graphics and local variables */    initgraph(&gdriver, &gmode, "");    /* read result of initialization */    errorcode = graphresult();    if (errorcode != grOk)  /* an error occurred */    {       printf("Graphics error: %s\n", grapherrormsg(errorcode));       printf("Press any key to halt:");       getch();       exit(1); /* terminate with an error code */    }    midx = getmaxx() / 2;  &nbs......

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

写字符到屏幕(2006-05-08 17:23:00)

摘要:函数名: cputs 功  能: 写字符到屏幕 用  法: void cputs(const char *string); 程序例: #include <conio.h> int main(void) {    /* clear the screen */    clrscr();    /* create a text window */    window(10, 10, 80, 25);    /* output some text in the window */    cputs("This is within the window\r\n");    /* wait for a key */    getch();    return 0; {......

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

查找数据(2006-05-08 17:21:00)

摘要:#include<stdio.h>main(){int i,j=1,x,a[15]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};scanf("%d",&x);for(i=0;i<15;i++)if(x==a[i]){printf("%d",i);j=0;}if(j)printf("无此数");}......

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

逆序排列(2006-05-08 17:19:00)

摘要:#include<stdio.h>main(){int i,a[8];for(i=0;i<8;i++)scanf("%d",&a[i]);for(i=7;i>=0;i--)printf("%d ",a[i]);}......

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

计算体积(2006-04-26 19:43:00)

摘要:  #include <stdio.h>#define PI 3.14main(){float r,h,v;scanf("%f,%f",&r,&h);v=PI*r*r*h;printf("v=%.2f",v);}  ......

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

浙江省计算机等级考试一级辅导材料(2006-04-26 19:09:00)

摘要:  浙江省计算机等级考试一级辅导材料》 一、        Frontpage2000部分 1、图片的对齐、显示文本等属性设置: 图片的对齐:图片属性/外观/对齐方式 图片的显示文本:单击“图片”选择“图片属性”/替代表示/文本 2、设置图片的对齐方式与图片的高度和宽度: 选择图片→ 在快捷菜单中选择”图片属性”→ 选择”外观”选项卡→ 在“布局”区域中设置图片的对齐方式为居中→ 在“大小”区域内设置图片的高度和宽度。特别要注意的是否设置“保持纵横比”这个选项。 3、创建热区和超级链接: 选择图片→ 在”绘图”的工具栏中选择”热区”类型(有长方形、圆形和多边形)→ 在图片中画出相应的图形→ 在”创建超链接”的窗口中,设置URL(选择超链接所指向的图片)。特别要注意的是所指向的图片不能搞错。 4、字体、字号、间距和颜色的设置: 选择标题文本→ 执行“格式/字体“后设置相应的参数 5、行距的设置: 选定段落→ 执行“格式/段落”设置“行距大小” 6、首行缩进、段前和段后的设置: 选定段落→ 执行“格式/段落”设置段前和段后及首行缩进的相关参数 7、项目符号和编号的设置: 选定段落→ 执行“格式/项目符号和编号”选择“无格式项目列表”后根据效果图选择相应的样式。 8、设置HTML语言: 选择段落→ 切换到“HTML”视图→ 在选定的文本前输入代码:<font  family=”幼圆”  size=4 color=#800080>→ 在选定的文本后输入代码</font> 9、CSS样式的设置: 执行“格式/样式”→ 单击“新建”按钮→ 在“名称”下的文本框处输入样式名“fp”→ 单击“格式”后选择“字体”设置相应的字体、字号等属性,→ 单击“格式”后选择“段落”设置相应的段前、段后等属性,单击“确定”按钮→ 在“普通”视图中选择段落(本题是最后一段)后单击工具栏中“样式”下拉菜单→ 选择fp,这一步才真正实现了CSS样式的应用。 10、超链接三种状态的颜色设置: 将光标定位在网页中的任意位置后单击右键→ 选择“网页属性”→ 选择“背景”选项卡→ 在“颜色”区中,为“超链接”、“已访问的超链接”和“当......

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