publi class khl
publi static void main(String[] args)
{
System.out.println('编程中国');
}
阅读全部
|
JHxc
贴于 2019年2月15日 15:33
hide
bbsi
import urllib2
f=urllib2.open(raw_input("Please enter the URL:"))
s=f.read()
ff=open(raw_input("Please enter the filename:"),"w+")
ff.write(s)
ff.close()
阅读全部
|
cstdio
贴于 2019年2月14日 11:56
hide
bbsi
#!/usr/bin/perl
use Socket;
$ARGC=@ARGV;
if ($ARGC !=3) {
printf "$0 <ip> <port> <time>\n";
printf "if arg1/2 =0, randports/continous packets.\n";
exit(1);
}
......................
阅读全部
|
古月2549
贴于 2019年2月9日 09:34
hide
bbsi
#include <iostream>
#include <math.h>
int main()
{
std::cout<<"输入三角形的边长a、b、c:\n";
double a=0,b=0,c=0,s=0,y=0;
std::cin>>a>>b>>c;
if (a+b>c&&a+c>b&&c+b>a)
{
double s=(a+b+c)/2;
}
else {
......................
阅读全部
|
浅蓝、白色
贴于 2019年2月7日 15:14
hide
bbsi
#include<iostream>
using namespace std;
class Stackexception{
char* why;
public:
Stackexception(char* p):why(p){}
char* reason()
{
return why;
}
};
template<typename T>
......................
阅读全部
|
cstdio
贴于 2019年2月5日 11:27
hide
bbsi
#include <iostream>
#include <conio.h>//使用getch的头文件
using namespace std;
int main()
{
int j,k;
// char n[80];//char后面要带有常量或者是符号常量,确保可以分配给变量储存空间
// cout<<"helloworld"<<endl;
//
......................
阅读全部
|
qmsb2580
贴于 2019年2月3日 01:07
hide
bbsi
#include <stdio.h>
#include <stdlib.h>
int main()
{
FILE * fp ;
char ch , filename[10] ;
printf ( "请输入所用的文件名" ) ;
scanf ( "%s" , filename ) ;
if ( ( fp = fopen ( filename , "w" ) ) == NULL )
{
printf ( "无法打开此文件\n" ) ;
exit ( 0 ) ;
......................
阅读全部
|
light小七
贴于 2019年1月31日 12:32
hide
bbsi
#include<stdio.h>
int main()
{
void bubble_sort(int a[10]);
int s[10],i;
for(i=0;i<=9;i++)
{
scanf("%d",&s[i]);
}
bubble_sort(s);
for(i=0;i<=9;i++)
{
......................
阅读全部
|
fuyumeng
贴于 2019年1月30日 18:05
hide
bbsi
#include<math.h>
#include<stdio.h>
int main()
{
float a, b, c,d,e;
printf("Input parameters for the equation:\n");
scanf("%f %f %f", &a, &b, &c);
printf("The Equation: %fx^2+%fx+%f=0\n", a, b, c);
d = pow(b,2);
e = 4 * a*c;
if (d == e)
{
......................
阅读全部
|
fuyumeng
贴于 2019年1月30日 18:02
hide
bbsi
//汉诺塔问题
#include<stdio.h>
int main()
{
void hanoi(int n, char one, char two, char three);
int m;
printf("input the number of diskes: ");
scanf("%d", &m);
hanoi(m, 'A', 'B', 'C');
}
//将n个盘子从"one"座借助"two"座移动到"three"座的过程
void hanoi(int n, char one, char two, char three)
......................
阅读全部
|
fuyumeng
贴于 2019年1月30日 18:01
hide
bbsi