使用数组存储一个英文句子如“Java is an object oriented programming language"显示该句子
1个回答
展开全部
是书上的课后练习吧
/*
* Copyright:bee1314 progams studio'
* All my programs can be copied and modified
* *******************************************
* Author:hufeng Date:2008/3/13
* Version:v1.0
*********************************************
* Decription;The progam computes a group of words
* and average
*/
public class AverageWord
{
//main mothed
public static void main(String[] args)
{
String str = "java is an object oriented programming language";
int length = str.length();
int average = (length - 6) / 7;
System.out.println(str);
System.out.println("The average of word is " + average);
}
}
/*
* Copyright:bee1314 progams studio'
* All my programs can be copied and modified
* *******************************************
* Author:hufeng Date:2008/3/13
* Version:v1.0
*********************************************
* Decription;The progam computes a group of words
* and average
*/
public class AverageWord
{
//main mothed
public static void main(String[] args)
{
String str = "java is an object oriented programming language";
int length = str.length();
int average = (length - 6) / 7;
System.out.println(str);
System.out.println("The average of word is " + average);
}
}
参考资料: 自己的程序--from chaohu college
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |