1331com银河游戏

ƽ̨ûĻоѡصģ1CԾС 2CС 3CԱдС 4CԽСϳһ 5cС 6һʾС C 7cС 8cС 9˭ȤcС򣬲ҪԴ룡 10CС
ƽ̨û 2018-06-06 16:52:55

Ǿѡƽ̨ûʱ

yijiaok
yijiaok


yijiaokCԾС

CԾС,׶,ΪϤ(ÿCԳ֪ʶ),˺ܲ߼תCͲô,ش󾭵CС.ллҵĹע!!!
Ľѱ9687˵
Ŀ1234֣ɶٸͬظֵλǶ٣ 
1.ڰλʮλλֶ1234екȥ
С
2.Դ룺
main()
{
int i,j,k;
printf("\n");
for(i=1;i<5;i++) *Ϊѭ*/
for(j=1;j<5;j++)
for (k=1;k<5;k++)
{
if (i!=k&&i!=j&&j!=k) /*ȷijkλͬ*/
printf("%d,%d,%d\n",i,j,k);
}
}
==============================================================
2
ĿҵŵĽɡ(I)ڻ10Ԫʱ10%
10Ԫ20Ԫʱ10ԪIJְ10%ɣ10ԪIJ֣ɿ
7.5%2040֮ʱ20ԪIJ֣5%4060֮ʱ
40ԪIJ֣3%60100֮ʱ60ԪIJ֣1.5%
100Ԫʱ100ԪIJְ1%ɣӼ뵱IӦŽ
1.ֽ磬λעⶨʱѽɳ͡
2.Դ룺
main()
{
long int i;
int bonus1,bonus2,bonus4,bonus6,bonus10,bonus;
scanf("%ld",&i);
bonus1=100000*0.1;bonus2=bonus1+100000*0.75;
bonus4=bonus2+200000*0.5;
bonus6=bonus4+200000*0.3;
bonus10=bonus6+400000*0.15;
if(i<=100000)
bonus=i*0.1;
else if(i<=200000)
bonus=bonus1+(i-100000)*0.075;
else if(i<=400000)
bonus=bonus2+(i-200000)*0.05;
else if(i<=600000)
bonus=bonus4+(i-400000)*0.03;
else if(i<=1000000)
bonus=bonus6+(i-600000)*0.015;
else
bonus=bonus10+(i-1000000)*0.01;
printf("bonus=%d",bonus);
}

==============================================================
3
Ŀһ100һȫƽټ168һȫƽʸǶ٣
1.10жϣȽ100ٿٽ268ٿ
Ľǽ뿴
2.Դ룺
#include "math.h"
main()
{
long int i,x,y,z;
for (i=1;i<100000;i++)
{ x=sqrt(i+100); /*xΪ100󿪷Ľ*/
y=sqrt(i+268); /*yΪټ168󿪷Ľ*/
if(x*x==i+100&&y*y==i+268)/*һƽƽڸ˵ȫƽ*/
printf("\n%ld\n",i);
}
}
==============================================================
4
Ŀijijijգжһһĵڼ죿
1.35ΪӦȰǰµļȻټ5켴ĵڼ죬
·ݴ3ʱ迼Ƕһ졣
2.Դ룺
main()
{
int day,month,year,sum,leap;
printf("\nplease input year,month,day\n");
scanf("%d,%d,%d",&year,&month,&day);
switch(month)/*ȼijǰ·ݵ*/
{
case 1:sum=0;break;
case 2:sum=31;break;
case 3:sum=59;break;
case 4:sum=90;break;
case 5:sum=120;break;
case 6:sum=151;break;
case 7:sum=181;break;
case 8:sum=212;break;
case 9:sum=243;break;
case 10:sum=273;break;
case 11:sum=304;break;
case 12:sum=334;break;
defaultrintf("data error");break;
}
sum=sum+day; /*ټij*/
if(year%400==0||(year%4==0&&year%100!=0))/*жDz*/
leap=1;
else
leap=0;
if(leap==1&&month>2)/*·ݴ2,Ӧüһ*/
sum++;
printf("It is the %dth day.",sum); }
==============================================================
5
Ŀx,y,zС
1.취СŵxϣȽxyбȽϣx>yxyֵн
ȻxzбȽϣx>zxzֵнʹxС
2.Դ룺
main()
{
int x,y,z,t;
scanf("%d%d%d",&x,&y,&z);
if (x>y)
/*x,yֵ*/
if(x>z)
/*x,zֵ*/
if(y>z)
/*z,yֵ*/
printf("small to big: %d %d %d\n",x,y,z);
}
==============================================================
6
Ŀ*ĸCͼ
1.<|>*<|>ֽдĸCٷ
2.Դ룺
#include "stdio.h"
main()
{
printf("Hello C-world!\n");
printf(" ****\n");
printf(" *\n");
printf(" * \n");
printf(" ****\n");
}
==============================================================
7
ĿͼcУһVery Beautiful!
1.ַ256ַͬͼβһ
2.Դ룺
#include "stdio.h"
main()
{
char a=176,b=219;
printf("%c%c%c%c%c\n",b,a,a,a,b);
printf("%c%c%c%c%c\n",a,b,a,b,a);
printf("%c%c%c%c%c\n",a,a,b,a,a);
printf("%c%c%c%c%c\n",a,b,a,b,a);
printf("%c%c%c%c%c\n",b,a,a,a,b); }
==============================================================
8
Ŀ9*9ھ
1.пǣ99УiУjС
2.Դ룺
#include "stdio.h"
main()
{
int i,j,result;
printf("\n");
for (i=1;i<10;i++)
{ for(j=1;j<10;j++)
{
result=i*j;
printf("%d*%d=%-3d",i,j,result);/*-3dʾ룬ռ3λ*/
}
printf("\n");/*ÿһк*/
}
}
==============================================================
9
ĿҪ̡
1.iУjУi+jĺ͵ı仯ڷ񣬻ǰ׷
2.Դ룺
#include "stdio.h"
main()
{
int i,j;
for(i=0;i<8;i++)
{
for(j=0;j<8;j++)
if((i+j)%2==0)
printf("%c%c",219,219);
else
printf(" ");
printf("\n");
}
}
==============================================================
10
Ŀӡ¥ݣͬʱ¥ϷӡЦ
1.iУjУjiı仯ڷĸ
2.Դ룺
#include "stdio.h"
main()
{
int i,j;
printf("\n");/*Ц*/
for(i=1;i<11;i++)
{
for(j=1;j<=i;j++)
printf("%c%c",219,219);
printf("\n");
}
}

οϣ http://hi.baidu.com/rudyzone/blog/item/705ecb077fe47acd7b8947f0.html

һα༭ʱ Ƽ2017-09-05 06:26:17



ǵҴ򿪳ʱȻҪŻû£һӺԶػλϺæĴҪCC++ࣩлл
Ľѱ8291˵
// ð졣VC½һwin32̣δWinMainڵcpp
//ȻԴͼﰴҷͼӿؼҪ
//ǸıidҪΪIDC_INPUT
//ԭȵOKťָijɡȷ

#include "stdafx.h"
#include "resource.h"
STARTUPINFO si;
PROCESS_INFORMATION pi;
LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM);
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
CreateProcess(0,"shutdown -s -t 60 -c \"롰һӺػԡ\"",0,0,0,CREATE_NO_WINDOW,0,0,&si,&pi);
return DialogBox(hInstance, (LPCTSTR)IDD_ABOUTBOX, GetDesktopWindow(), (DLGPROC)About);
}

LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
char str[32];
switch (message)
{
case WM_INITDIALOG:
return TRUE;
case WM_COMMAND:
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
{
GetDlgItemText(hDlg,IDC_INPUT,str,32);
if(strcmp(str,"")==0){
CreateProcess(0,"shutdown -a",0,0,0,CREATE_NO_WINDOW,0,0,&si,&pi);
EndDialog(hDlg, LOWORD(wParam));
MessageBox(hDlg,"Ժקק","֪û",0);
}
return TRUE;
}
break;
}
return FALSE;
}
һα༭ʱ Ƽ2017-05-21 13:09:59
Ԩĵʦ
Ԩĵʦ


ԨĵʦCԱдС

CԱдС԰뾶1.5Բߣ3ԲܳԲԲԲԲscanfݣʱҪ˵ȡСλ֡

Ľѱ63˵

#include 
#define Pi 3.1416
int main()
{float r,h,c,s1,s2,v1,v2;
 printf("Բ뾶Բߣ");
 scanf("%f%f",&r,&h);
 c=2*Pi*r;
 s1=0.5*c*r;
 s2=4*s1;
 v1=3*s1*r/4;
 v2=s1*h;
 printf("Բܳ=%f\nԲ=%f\nԲ=%f\n",c,s1,s2);
 printf("Բ=%f\nԲ=%f\n",v1,v2);
 return 0;
}

һα༭ʱ 2017-12-22
ҪҲû취
ҪҲû취


ҪҲû취CԽСϳһ


һ´ĶУӦд򣬼

Ľѱ6446˵
1ûзֺţ
2Ҫswitch case
3д2һƽֵһ㣩
һα༭ʱ Ƽ2018-04-13 11:39:12
12138
12138


12138cС

ѧУһЩͬѧһһʾ飬ΪʵĿ͹ԣüN11000֮N100ظֻ֣һͬȥͬӦŲͬѧѧšȻٰЩС򣬰źõ˳... ѧУһЩͬѧһһʾ飬ΪʵĿ͹ԣüN11000֮N100ظֻ֣һͬȥͬӦŲͬѧѧšȻٰЩС򣬰źõ˳ȥͬѧ顣Эɡȥء롰򡱵Ĺ

Input
ݡ

ÿ2У1Ϊ1ʾɵĸ

N

2NÿոΪ

Output
Ҳ2У1Ϊ1Mʾͬĸ2ΪMÿոΪСźIJͬ
WUST Online Judge
1310:
Ľѱ6910˵

#include
int main()
{char a[101]={0};
 int i,n,x;
 scanf("%d",&n);
 for(i=0;i   {scanf("%d",&x);
    a[x]=1;
   }
 for(n=i=0;i<101)s+=a[i];  
 printf("%d\n",n);
 for(i=1;i<101;i++)
   if(a[i])printf("%d ",i);
 printf("\n");
 return 0;
}

һα༭ʱ 2018-05-24



һʾС C

һʾС,
Ľѱ8146˵

void a(int aa)

{for(int i=0;i

void b()

{printf ("*");}

char c(int cc)

{printf("%c",cc);return 0;}

int main()

{a(6);b();a(3);b();a(5);b();a(3);b();

printf ("\n");

a(4);b();a(8);b();a(8);b();

printf ("\n");

a(3);b();a(19);b();

printf ("\n");

a(3);b();a(4);c(73);a(1);c(76);c(111);c(118);

c(101);a(1);c(89);c(111);c(117);a(5);b();

printf ("\n");

a(4);b();a(17);b();

printf ("\n");

a(6);b();a(13);b();

printf ("\n");

a(8);b();a(9);b();

printf ("\n");

a(10);b();a(5);b();

printf ("\n");

a(13);b();

printf ("\n");return 0;

}

Ч£

չĶ

CһͨüԣӦù㷺CԵĿṩһԼ׵ķʽ롢ͼ洢ĻԼҪκлֱ֧еıԡ

CṩͼĹܣȻÿƽ̨ԣһ׼дCԳƽ̨Ͻб룬һЩǶʽƬMCUԼԵҵƽ̨

ʮͰʮΪ˱õC﷨죬ұ׼ΪCƶһұ׼﷨ΪANSI CΪCı׼[1]  Ŀǰ2011128գʱ׼֯ISO͹ʵ繤ίԱᣨIECC11׼CԵĵٷ׼ҲCԵ±׼ñ׼õ֧˺ֺͺֱʶһ̶ʵ˺ֱ̡

һα༭ʱ 2018-03-30
ѧϰcday
ѧϰcday


ѧϰcdaycС

ԭ£ 򵥽£֮ǰŹÿְĸĸĸӦ֣ Please save the program with the name phone.c Write a program that translates a alphabetic phone number into numeric form: Enter phone number: CAL... ԭ£ 򵥽£֮ǰŹÿְĸĸĸӦ֣
Please save the program with the name phone.c

Write a program that translates a alphabetic phone number into numeric form:
Enter phone number: CALLATT
2255288
(in case you dont have a telephone nearby, here are the letters on keys: 2=ABC, 3=DEF, 4=GHI, 5=JKL, 6=MNO, 7=PQRS, 8=TUV, 9=WXYZ.) If the original phone numbers contains none-alphabetic characters (digit or punctuation, for example), leave them unchanged:
Enter phone number: 1-800-COL-LECT
1-800-ɢ
You may assume that any letters entered by user are upper case.
£
뱣 phone.c ij
дһ򣬽һĸĵ绰תʽU
绰U CALLATT
2255288
(ûе绰ڸĸϩU 2 = ABC3 = DEF4 = GHI5 = JKL6 = MNO7 = PQRS8 = TUV 9 = WXYZ.)ԭĵ绰аĸַ ֻţ磩DZֲU
绰U 1-800-COL-LECT

Լûκĸд
Ľѱ3738˵

#include 
#include 

int main(int argc, char *argv[]) 
{
int i,len;
char s[20]={"\0"};
printf("绰:");
scanf("%s",s);
len=strlen(s);
for(i=0;i {
if((s[i]>='0' && s[i]<='9') || s[i]=='-')
{
continue;
}
switch(s[i])
{
case 'A':
case 'B':
case 'C':
s[i]='2';
break;
case 'D':
case 'E':
case 'F':
s[i]='3';
break;
case 'G':
case 'H':
case 'I':
s[i]='4';
break;
case 'J':
case 'K':
case 'L':
s[i]='5';
break;
case 'M':
case 'N':
case 'O':
s[i]='6';
break;
case 'P':
case 'Q':
case 'R':
case 'S':
s[i]='7';
break;
case 'T':
case 'U':
case 'V':
s[i]='8';
break;
case 'W':
case 'X':
case 'Y':
case 'Z':
s[i]='9';
break;
default:
break;
}
}
printf("\n%s",s);
return 0;
}

һα༭ʱ 2016-10-24
ѧϰcday
ѧϰcday


ѧϰcdaycС

дһȡһɵַ, С㣬ҲǸ ַʮƱʾʽĸ﷨ӦַתΪfloat͵ֵͿ a. 3.78 b.-45.893 c. 3.4.5 (an err... дһȡһɵַ, С㣬ҲǸ
ַʮƱʾʽĸ﷨ӦַתΪfloat͵ֵͿ
a. 3.78 b.-45.893 c. 3.4.5 (an error) d. -.25
Ľѱ4676˵

#include 
#include 
#include 
#include 

typedef struct
{
char* str_result;
float f_result;
int i_result;
}RESULT;

RESULT* fun(char* s)
{
RESULT re;  //һֵṹ 
re.str_result=(char*)malloc(sizeof(char)*10);  //ڴڴ洢Ϣַ,ڶϷ,Ҳ˵char
int len=strlen(s); //ȡַ 
int i,dot=0; //dot: ַмСdotڼ,1򷵻رϢ 
for(i=0;i {
if(s[i]=='.')
{
dot++;
if(dot>1)   //жС 
{
strcpy(re.str_result,"an error!");
re.f_result=0.0;
re.i_result=0;
return &re;
}
}
}
if(dot==0) //ûС, 򷵻 
{
strcpy(re.str_result,"");
re.i_result=atoi(s);
re.f_result=0.0;
return &re;
}
else if(dot==1) //ֻһС, 򷵻float 
{
strcpy(re.str_result,"");
re.f_result=atof(s);
re.i_result=0;
return &re;
}
}

int main(int argc, char *argv[]) 
{
char s[10]={'\0'};
while(1)
{
fflush(stdin);
scanf("%s",s);
RESULT *re;  //һṹպֵ
re=fun(s);
if(strcmp(re->str_result,"an error!")==0) //صϢΪ, ӡַ 
{
printf("\nan error!");
}
else if(strcmp(re->str_result,"")==0) //صϢΪ
{
printf("\n%f",re->f_result);
}
else                                        //صϢΪ
{
printf("\n%d",re->i_result);
}
printf("\n\n?[y/n]: ");
char sel;
fflush(stdin);
scanf("%c",&sel);
if(sel=='y' || sel=='Y')
{
continue;
}
break;
}
return 0;
}

һα༭ʱ 2016-11-28
379008208
379008208


379008208˭ȤcС򣬲ҪԴ룡

Ľѱ7826˵
#include 
#include
#include
#include

#define numOfQuestions 10

void main()
{
srand(1);
for(int i=0;i{
bool add = rand()%2;
char oper = '-';
if(add) oper = '+';
int a = rand()%100;
int b = rand()%100;
if(!add)
{
while(b>a)b = rand()%100;
}
printf("%d %c %d =?", a, oper, b);
int answer = 0;
scanf("%d", &answer);
bool correct = false;
if(add)
{
if(answer == (a + b)) correct = true;
}
else
{
if(answer == (a - b)) correct = true;
}
if(correct)printf("شȷ!\n");
else printf("ش!\n");

}
}
һα༭ʱ Ƽ2017-09-25 10:35:55
CԳѧday
CԳѧday


CԳѧdayCС

дһϲtxtıijʾ һļû foster001 smith023 nyuyen002 һļ룺 x34rdf3e p43e4rdd w32eds22 Ȼͻֱĸʽtxtı foster001 x34rdf3e smith023 p43e4rdd nyuyen0... дһϲtxtıijʾ
һļû
foster001
smith023
nyuyen002
һļ룺
x34rdf3e
p43e4rdd
w32eds22
Ȼͻֱĸʽtxtı
foster001 x34rdf3e
smith023 p43e4rdd
nyuyen002 w32eds22
Ȼ,Ҫʾɵļ?
Ľѱ4329˵
#include 

int main()
{
FILE *fp1, *fp2, *fp3;
int c;
char answer;

fp1 = fopen("E:\\work\\AOI\\temp\\test\\username.txt", "rt");
fp2 = fopen("E:\\work\\AOI\\temp\\test\\password.txt", "rt");
fp3 = fopen("E:\\work\\AOI\\temp\\test\\ros.txt", "wt");
while(1)
{
while((c = fgetc(fp1))!=EOF)
{
if(c == '\n') break;
fputc(c, fp3);
}
fputc(' ', fp3);
while((c = fgetc(fp2))!=EOF)
{
fputc(c, fp3);
if(c == '\n') break;
}
if(feof(fp1)) break;
}

fclose(fp1);
fclose(fp2);
fclose(fp3);

printf("Ҫʾɵļ?\n");
scanf("%c", &answer);

if ( 'y' == answer || 'Y' == answer )
{
fp3 = fopen("E:\\work\\AOI\\temp\\test\\ros.txt", "rt");
while((c = fgetc(fp3))!=EOF)
{
printf("%c", c);
}

fclose(fp3);
}

getchar();
getchar();

return 0;
}
һα༭ʱ 2016-12-05
网站地图

银河1331官网