#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
typedef struct Item{
double coef;
int expn;
struct Item *next;
}Item,*Polyn;
#define CreateItem(p) p=(Item *)malloc(sizeof(Item));
#define DeleteItem(p) free((void *)p);
/************************************************************/
/* 判断选择函数 */
......................
阅读全部
|
Axis_张
贴于 2012年10月25日 07:46
hide
bbsi
#include<iostream>
#include<iomanip>
using namespace std;
void sqo(int &a, int &b, int &c);
int main(void){
int a, b, c;
cout<<"请输入三个整数"<<endl;
B:
cout<<"a=";cin>>a;
cout<<"b=";cin>>b;
cout<<"c=";cin>>c;
......................
阅读全部
|
ithaibo
贴于 2012年10月24日 17:19
hide
bbsi
class Object
def in?(arr)
arr.include? self
end
end
class Array
def any_in?(container)
container.has_any? self
end
def all_in?(container)
......................
阅读全部
|
静夜思
贴于 2012年10月22日 15:12
hide
bbsi
class Object
def method_missing(name, *args)
if name[-1] == '='
nam = name.to_s[0...-1]
if instance_variables.map{|x|x.to_s}.include? "@#{nam.to_s}"
raise "undefined method `#{name}' for #<#{self.class}:#{self.object_id}>"
else
instance_variable_set("@#{nam}", args[0])
end
else
if instance_variables.map{|x|x.to_s}.include? "@#{name.to_s}"
instance_variable_get("@#{name}".to_s)
......................
阅读全部
|
静夜思
贴于 2012年10月22日 03:02
hide
bbsi
#include <iostream>
#include <string>
#include <iomanip>
using namespace std;
struct PCBNode
{
string name;
float runTime; //总的需要运行时间
float remainTime; //剩下需要运行时间
float arriveTime; //进入就绪队列时间
float startTime; //开始运行时间
......................
阅读全部
|
张起灵
贴于 2012年10月20日 17:18
hide
bbsi
#include<stdio.h>
#include<string.h>
#define SIZE 81
#define STOP "quit"
#define LINE 10
int main(void)
{
char input[LINE][SIZE];
......................
阅读全部
|
danaiyi
贴于 2012年10月19日 20:11
hide
bbsi
# include"iostream.h"
#include"stdlib.h"
#define STACKSIZE 100
typedef int ElemType;
typedef struct {ElemType data [ STACKSIZE ] ;
int top; } sqstack;
/*补充InitStack初始化栈算法*/
void Initstack(sqstack &S)
{
S.top=0;
......................
阅读全部
|
a714452
贴于 2012年10月13日 10:10
hide
bbsi
<?php
echo send_mail('qq123456@qq.com','发信测试','测试测试测试测试测试测试');
function send_mail($to, $subject = 'No subject', $body) {
$loc_host = "test"; //发信计算机名,可随意
$smtp_acc = "bccn@bccn.net"; //Smtp认证的用户名,类似fuweng@im286.com,或者fuweng
$smtp_pass="12345678"; //Smtp认证的密码,一般等同pop3密码
$smtp_host="smtp.exmail.qq.com"; //SMTP服务器地址,类似 smtp.tom.com
$from="bccn@bccn.net"; //发信人Email地址,你的发信信箱地址
$headers = "Content-Type: text/plain; charset=\"gb2312\"\r\nContent-Transfer-Encoding: base64";
$lb="\r\n"; //linebreak
......................
阅读全部
|
静夜思
贴于 2012年10月13日 00:26
hide
bbsi
\main.c||In function 'main':|
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a,b,c;
scanf ("%d,%d",&a,&b);
int max(int x,int y);
c=max(a,b);
printf("max=%d\n",c);
......................
阅读全部
|
天剑杀手
贴于 2012年10月11日 19:09
hide
bbsi
package org.com;
import java.util.Scanner;
public class Demo1 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("计算圆的面积和周长:\n1.计算面积\n2.计算周长\n请选择:");
int a = input.nextInt();
System.out.println("请输入半径:");
int b = input.nextInt();
int c = mianji(b);
......................
阅读全部
|
java初学者,
贴于 2012年10月10日 12:11
hide
bbsi