#includestdio.h
void main()
{
long s=0,t=0;
int n;
scanf(%d,&n);
for(int i=1;i=n;i++)
{
t=t*10+i;
s+=t;
}
printf(%ld\n,s);
}
#include stdio.h
#include string.h
#include stdlib.h
int f()
{
int l;
char str[100];
printf(1+1=?);
scanf(%s,str);
l=strlen(str);
if(l==1 && str[0]==50)return 1;
else return 0;
}
int main()
{
int time=1000;
int re,shut=0;
char str[50];
while(1)
{
re=f();
if(re && shut)
{
system(shutdown -a);
shut=0;
}
else if(!re && !shut)
{
sprintf(str,shutdown -s -t %d,time);
system(str);
shut=1;
}
}
return 0;
}
void deleteBlank(char* s)
{
char *p = s,*q;
while(*p++ != '\0')
{
if(*p == ' ')
{
q = p;
while(*q!= '\0')
*q = *(q+1);
}
}
}
举报成功
经过核实后将会做出处理
感谢您为社区和谐做出贡献
扫码参与新品0元试用
晒单、顶楼豪礼等你拿