Play方法:使用play方法来播放媒体,自动将元素的paused属性的值变为false。Pause方法:使用pause方法来暂停播放,自动将元素的paused属性的值变为true。Load方法:使用load方法来重新载入媒体进行播放,自动将元素的playbackRate属性值变为defaultPl...
分类:
其他好文 时间:
2015-12-20 19:12:43
阅读次数:
223
1 #include 2 #include"robot.h" 3 /* run this program using the console pauser or add your own getch, system("pause") or input loop */ 4 5 int ...
分类:
其他好文 时间:
2015-12-19 23:06:28
阅读次数:
238
今天学习了c语言的一些库函数用法。比如:strcpy(),strlen(),strchr(),strcmp(),strcat(),strstr()。下面是我写的一些代码和结果。1.strlen#include<stdio.h>
#include<string.h>
intmain()
{
chara[10]="12345";
printf("%d\n",strlen(a));
system("pause");
r..
分类:
其他好文 时间:
2015-12-18 19:08:24
阅读次数:
174
第一题,很水,直接上代码 1 #include 2 #include 3 #include 4 /* run this program using the console pauser or add your own getch, system("pause") or input loop *...
分类:
其他好文 时间:
2015-12-17 13:00:53
阅读次数:
234
#include<stdio.h>intmain(){charstr1[20]={"hello"};charstr2[]={"bit"};printf("%s",strcat(str1,str2));system("pause");return0;}#include<stdio.h>intmain(){charstr1[20];charstr2[]={"bit"};printf("%s",strcpy(str1,str2));system("pause");return0;}#incl..
分类:
其他好文 时间:
2015-12-16 17:30:15
阅读次数:
218
#include<stdio.h>intmain(){ inti=0,sum=0,n=1,tmp=1; for(n=1;n<11;n++) { tmp=1; for(i=1;i<=n;i++) { tmp*=i; } sum+=tmp; } printf("%d\n",sum); system("pause"); return0;}这个代码很罗嗦非常不好可以优化为#include<stdio.h>intmain(){ inti=..
分类:
其他好文 时间:
2015-12-15 16:04:08
阅读次数:
127
#include<stdio.h>
intmain()
{
inti=0,n=0;
printf("请输入数字:");
scanf("%d",&i);
while(i)
{
n=i%10;
i=i/10;
printf("%d",n);
}
system("pause");
return0;
}
分类:
其他好文 时间:
2015-12-15 16:02:40
阅读次数:
180
#include<stdio.h>
#include<windows.h>
intmain()
{
charch[]="";
chara[]="1234567890";
inti=0,j=9;
while(i<=j)
{
ch[i]=a[i];
ch[j]=a[j];
printf("%s\n",ch);
Sleep(2000);
i++;
j--;
}
system("pause");
return0;
}
分类:
其他好文 时间:
2015-12-14 06:53:38
阅读次数:
179
#include<stdio.h>intmain(){inta=0;intn=0;intsum=0;inttmp=0;inti=0;scanf("%d%d",&a,&n);for(i=0;i<n;i++){tmp=a+tmp*10;sum=sum+tmp;}printf("sum=%d",sum);system("pause");return0;}
分类:
其他好文 时间:
2015-12-13 23:59:26
阅读次数:
318
使用临时变量非常简单#include<stdio.h>intmain(){ inta=1,b=2,c=0; printf("a="); scanf("%d",&a); printf("b="); scanf("%d",&b); c=a; a=b; b=c; printf("a=%d,b=%d\n",a,b); system("pause"); return0;}这时候我考虑可不可以不加入临时变量而同样达到目的呢..
分类:
其他好文 时间:
2015-12-11 07:18:07
阅读次数:
124