程序代码:#include <stdio.h>
int main(void)
{
int b = 4;
static float a = 4;
float c = a+b;
printf("%f\n", c);
return 0;
}
2011-04-22 22:38
程序代码:#include <stdio.h>
int main(void)
{
int b = 4;
static float a = 4;
float c = a+b;
printf("%f\n", c);
return 0;
}
2011-04-22 22:38
程序代码:public class main {
int a = 90;
static float b = 10.98f;
public static void main(String args[])
{
main s = new main();
//float c = a + b;
float c = s.a + s.b;
System.out.println("c =" +c);
}
}
2011-04-22 22:41
程序代码: public static void main(String args[])
{
//main s = new main();
float c = a + b;
//float c = s.a + s.b;
System.out.println("c =" +c);
}在这个main函数中应该是能直接使用main类当中的数据成员吧? 请指点
2011-04-22 22:44
float c(2);
int d(2);上面这样子不可以float []c = new float[3];上面这样子可以
float c = new float(3);上面这样子不可以
2011-04-22 22:55

2011-04-23 08:55
2011-04-23 10:12
2011-04-23 10:19
程序代码: byte []buffer = new byte[100];
int s = 0;
try
{
System.out.println("输入一个字符串: ");
s = System.in.read(buffer);
String string = new String(buffer, 0, s);
System.out.println(string);
System.out.println(string.toUpperCase());
System.out.println(string.toLowerCase());
}
catch (IOException e)
{
}
2011-04-23 13:20
2011-04-23 16:49