迫切需要帮助学校计划请帮忙 [英] Urgently need help for school program please help

查看:82
本文介绍了迫切需要帮助学校计划请帮忙的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好我试图为我的学校项目运行这个程序,但是当我编译'')''时,我仍然会收到相同的答案。在突出显示的行上,任何人都可以帮助我,谢谢大家。



/ **

*写一个类记录的描述在这里。

*

* @author(Ryan MIfsud)

* @version(版本1)

* /

公共类记录

{



public static void main(String Args []){


String Student_Name1;

String Student_surname1;

String Student_ID1;

String Student_group1;

System.out.println(" Enter name");

int name = Keyboard.readInt();

char grade;


grade =''_'';

if(姓名> Ryan,Robert,Victor,Jim,Sammy,Leo,Glen,Kyle || name < Kurt)System.out.println(名称不包括在内);

else


if(name> = Ryan,Robert, Victor,Jim,Sammy,Leo,Glen,Kyle&& name< = Kurt)

grade =''name included'';


<无线电通信/>
System.out.println("输入学生的姓名) );

Student_Name1 = Keyboard.readString();


System.out.println("输入学生的姓氏);

Student_surname1 = Keyboard.readString();


System.out.println("输入学生的ID);

Student_ID1 = Keyboard.readString();


System.out.println(" Enter student''sgroup");

Student_group1 = Keyboard.readString ();


System.out.println(Student_Name1 + Student_surname1 + Student_ID1 + Student_group1);


System.out.println("最后输入-1");

int counter = -1;


}


}

Hi to all I''am trying to run this program for my school progect but I keep receiving the same answer when I compile '')'' expected. on the highlighted line can anyone help me thanks to all.



/**
* Write a description of class Records here.
*
* @author (Ryan MIfsud)
* @version (version 1)
*/
public class Records
{


public static void main (String Args []){

String Student_Name1;
String Student_surname1;
String Student_ID1;
String Student_group1;
System.out.println ("Enter name ");
int name = Keyboard.readInt();
char grade;

grade = ''_'';

if ( name > Ryan,Robert,Victor,Jim,Sammy,Leo,Glen,Kyle || name < Kurt) System.out.println ("name is not included");
else

if (name >= Ryan,Robert,Victor,Jim,Sammy,Leo,Glen,Kyle && name <= Kurt )
grade = ''name included'';



System.out.println ( "Enter student''s name" );
Student_Name1 = Keyboard.readString();

System.out.println ( "Enter student''s surname" );
Student_surname1 = Keyboard.readString();

System.out.println( "Enter student''s ID" );
Student_ID1 = Keyboard.readString();

System.out.println( "Enter student''s group" );
Student_group1 = Keyboard.readString();

System.out.println ( Student_Name1 + Student_surname1 + Student_ID1 + Student_group1 );

System.out.println ("End by entering -1");
int counter = -1;


}

}

推荐答案

嘿,从现在开始,请将您的代码放入代码标签中(当您在显示REPLY GUIDELINES的框中发布时,请在右侧查看。另外,你可以发布你在尝试编译时得到的完整错误。我对它究竟是什么感到困惑我试图告诉你......


-blazed
Hey, from now on please put your code in code tags (look on the right when you post on the box that says "REPLY GUIDELINES". Also, could you post the full error you get when you try to compile. I''m a bit confused as to what exactly it''s trying to tell you...

-blazed


if(name> = Ryan,Robert,Victor,Jim,Sammy ,Leo,Glen,Kyle&& name< = Kurt)

grade =''name included'';


这两行不会编译。你想在那里做什么?

另外char变量只能保存字符。
if (name >= Ryan,Robert,Victor,Jim,Sammy,Leo,Glen,Kyle && name <= Kurt )
grade = ''name included'';


Those two lines will not compile. What are you trying to do there?
Also char variable can only hold chars.


我想创建一个程序,当我给出名字时,列表中的姓氏和身份证明它会给我姓名,当它不在列表中时,它会说不包括姓名,感谢您的关注,并感谢Blazedaces关于这些代码,但我仍然是这个四分之一的新人。我不知道代码是如何工作的,谢谢你


当我编译这是我得到的'''''预期
I''am trying to creat a program that when I give name ,surname and Id in the list it will give me the name and when it is not in the list it will say name not included thanks for your interest and sorry to Blazedaces about the the codes but I''m still new in this fourm and did''t understand exactly how the codes work thank you

When I compile this is what I get '')'' expected


这篇关于迫切需要帮助学校计划请帮忙的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆