#include<stdioh>
void myStrcpy(chars,chart){
char p = t, dest = s;
while(p){
(dest++) = (p++);
}
dest = 0;
}
int main(){
char dest[15];
char source[15] = "gewgweg";
myStrcpy(dest, source);
printf("%s\n", dest);
return 0;
}
然而这题并没有什么luan用
我没加注释,你有什么就直接问吧。
import javaioBufferedWriter;import javaioFile;
import javaioFileWriter;
import javaioIOException;
public class Cource {
private int cNumber;
private String cName;
private int cUnit;
public Cource(int cNumber, String cName, int cUnit) {
super();
thiscNumber = cNumber;
thiscName = cName;
thiscUnit = cUnit;
}
public int getcNumber() {
return cNumber;
}
public void setcNumber(int cNumber) {
thiscNumber = cNumber;
}
public String getcName() {
return cName;
}
public void setcName(String cName) {
thiscName = cName;
}
public int getcUnit() {
return cUnit;
}
public void setcUnit(int cUnit) {
thiscUnit = cUnit;
}
public void printCourceInfo(){
try {
File file=new File("outtxt");
if (!fileexists()) {
filecreateNewFile();
}
BufferedWriter a=new BufferedWriter(new FileWriter(file));
awrite("课程编号,课程名,学分数");
anewLine();
awrite(thiscNumber+","+thiscName+","+thiscUnit);
aclose();
Systemoutprintln("输出成功");
} catch (IOException e) {
// TODO Auto-generated catch block
eprintStackTrace();
}
}
}
import testCource;
public class Test {
public static void main(String[] args) {
Cource test=new Cource(121227, "课程名为Java程序设计", 3);
testprintCourceInfo();
}
}
#include <stdioh>
int main(void)
{
int a=0,b=0;
printf("输入长宽:\t");
scanf("%d%d",&a,&b);
printf("周长:%d\n",a2+b2);
printf("面积:%d\n",ab);
return 0;
}
double n = 0;
scanf("%lf", &n);
bool r1 = n >= 2000;
bool r2 = n >= 1000;
bool r3 = n >= 500;
switch(r1+r2+r3){
case 0 :
printf("%2f", n);
break;
case 1 :
printf("%2f", n - 50);
break;
case 2 :
printf("%2f", n 085);
break;
case 3 :
printf("%2f", n 08);
break;
}
if (r3 == 0){
printf("%2f", n);
else if(r2 == 0)
printf("%2f", n - 50);
else if(r1 == 0)
printf("%2f", n 085);
else
printf("%2f", n 08);
}
以上就是关于求C语言大神编一道程序,急,明天就要考试了全部的内容,包括:求C语言大神编一道程序,急,明天就要考试了、求大神用Java编写这个程序,要有具体代码,万分感谢,定采纳、懂C语言的大神帮我编写一下程序等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)