用户登录
用户注册

分享至

guesswordgameppt

  • 作者: 奔跑的宅猪
  • 来源: 51数据库
  • 2020-04-21

一、C语言GuessWord程序

#include

#include

#include

char *SecondArray();

char *GuessWord(char ch,char a[]);

main()

{

char a[5]={"----"};

char c;

int i,n=0;

printf("The word now looks like this:%s\n",a);

while(n

二、计算机JAVA编写猜单词程序

import java.util.Scanner;

public class guess {

String word;

boolean[] flag;

int wrong = 5;

public guess(String word) {

this.word = word;

flag = new boolean[word.length()];

}

public static void main(String[] args) {

guess g = new guess("beatles");

g.start();

}

public void start() {

System.out.println("Welcome to the Hangman game. The category is Rock Bands");

String str = "";

for (int i = 0; i 0) {

System.out.print("Enter a letter:");

Scanner sc = new Scanner(System.in);

String in = sc.next();

char c = in.charAt(0);

boolean f = false;

for (int i = 0; i

三、学习Word 、Excel、Powerpoint的感想

一、熟能生巧。只有多练习才能很好地掌握Word、Excel和Powerpoint的操作技巧,才能熟练地进行操作。

二、在运用中学习。在我们的日常工作、学习和生活中经常要用到Word、Excel和Powerpoint,只要我们掌握了基础的操作方法后,可以在运用中不断摸索、学习,使得我们的操作更加熟练,直到运用自如。

三、学习是一件很累的事情,只有坚持才能成功。

四、兴趣是最好的老师,只有对所学的内容产生浓厚的兴趣,我们才会用更多的时间和精力去学习,正所谓:“好之不如痴之,不痴不成才”。

四、一道acm题 Guessing game

#include<iostream>

int compare(int b[],int c[],int b_len) //比较大整数的大小

{

int p;

for(p=0;c[p]!='\n';p++)

p--;

if (b_len<p]) return 1; //比较a,b的位数确定返回值

else //位数相等时的比较

{

i=0;

while (b[i]==b[i]) //逐位比较

i--;

if (i==0) return 1;

else if (b[i]>c[i]) return 0;

else return 1;

}

}

int minus(char a[],char b[],char c[],int b_len)

{

int n=0,p,h=0,i,j;

char *A,*B,*C;

A=a;

B=b;

C=c;

for(p=0;a[p]!='\n';p++)

p--;

if(p<b_len)

return n;

else

{

*(C+p)='\n';

if( compare(B,C)==1);

{

n++;

for(i=p,j=p;i>=0;i--,j--)

{

while(j>=0)

{

if(*(A+i)+h>=*(B+j))

{

*(C+i)=*(A+i)-*(B+j);

h=0;

}

else

{

h=-1;

*(C+i)=*(B+j)-*(A+i)+h;

}

i--;

j--;

}

*(C+i)=*(C+i)+h;

}

A=C;

}

return n;

}

转载请注明出处51数据库 » guesswordgameppt

软件
前端设计
程序设计
Java相关