首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看全站
int index=0;
void dec2yyy(int yyy,int source,char* bin)
{
    if(source==0) return;
    dec2yyy(yyy,source/yyy,bin);
    if((source%yyy)<10) bin[index]=(char)(source%yyy+0x30);
    else bin[index]=(char)(source%yyy+0x37);
    index++;
}
阅读全部 | wp231957 贴于 2013年3月15日 09:07     hide bbsi
#include <stdio.h>
void hanoi(int n, char A, char B, char C) {
if(n == 1) {
printf("Move sheet %d from %c to %c\n", n, A, C);
}
else {
hanoi(n-1, A, C, B);
printf("Move sheet %d from %c to %c\n", n, A, C);
hanoi(n-1, B, A, C);
}
}
int main() {
......................
阅读全部 | 忧伤的小王子 贴于 2013年3月14日 01:29     hide bbsi
#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])

    while(1){
    int y,m,d;
    int mon[12]={31,28,31,30,31,30,31,31,30,31,30,31};
    int n,N;
    cin>>y>>m>>d;
......................
阅读全部 | woaihe2728 贴于 2013年3月14日 00:29     hide bbsi
double price, totalPrice, discount, discountedPrice;
            int quantity;
            const double d = 0.85f;
            price = double.Parse(textBox2.Text);
            quantity = int.Parse(textBox3.Text);
            totalPrice = price * quantity;
            textBox4.Text = totalPrice.ToString();
阅读全部 | 小小袁 贴于 2013年3月13日 14:39     hide bbsi
一.
#include<stdio.h>
main()
{
int a=5,c=4,b=5;
a||(b=a+c)&&c;
printf("%d\n",a||(b=a+c)&&c);
printf("%d %d %d\n",a,b,c);
a&&(b=b+1)||(c=b+1);
printf("%d\n",a&&(b=b+1)||(c=b+1));
printf("%d %d %d",a,b,c);
}
......................
阅读全部 | 魔道无敌 贴于 2013年3月12日 16:14     hide bbsi
#include <windows.h>
#include <stdio.h>
#include <time.h>
#include <mmsystem.h>
#include "resource.h"


HINSTANCE hInst;
HBITMAP pic,empty,compare_pic,pict[8],compare_pict[8],other;    //所有图的变量名
HDC hdc,mdc;                                                    //DC名
int mouse_x,mouse_y,n=0,line=3,high3=100,high4=200,high5=300;   //鼠标X Y 移动步数 难度 记录
char str[10]=" ";                                               //字符串,显示步数和记录时用
......................
阅读全部 | w一直很好 贴于 2013年3月11日 14:56     hide bbsi
#include<stdio.h>
#include<stdlib.h>

#define OK 1
#define FALSE 0
#define maxsize 1024
typedef struct node
{
char data;
struct node *next;
}linkstack;

......................
阅读全部 | 笑傲 贴于 2013年3月9日 15:19     hide bbsi
#include<stdio.h>
int CutEachOther(int a,int b)
{
int temp;
while(1)
{
if(a==b){temp=a;break;}
else if(a<b)
{temp=a;a=b;b=temp;}
temp =a-b;
if(temp==b)
{temp=b;break;}
......................
阅读全部 | 雨中人X 贴于 2013年3月9日 13:06     hide bbsi
#include<stdio.h>
int main()
{
printf("hello world");
}
阅读全部 | fumolan 贴于 2013年3月7日 13:01     hide bbsi
import java.util.*;
class Name implements Comparable
{  public String firstName,lastName;
   public Name(String firstName,String lastName)
   {  this.firstName=firstName;
      this.lastName=lastName;
    }
    public int compareTo(Name o)
    {  int lastCmp=lastName.compareTo(o.lastName);
       return(lastCmp!=0?lastCmp:firstName.compareTo(o.firstName));
     }
    public String toString()
......................
阅读全部 | wangjialong 贴于 2013年3月6日 20:35     hide bbsi
上一页 261 262 263 264 265 266 267 268 269 270 下一页