有趣的c++程序代码

@冀寇1888:谁有比较有趣的用C++写的小程序啊!有帮忙传两个啊,谢谢啊!简单点的啊,我是菜鸟! -
郑符13397887643…… #include <iostream> using namespace std; void Move(int a[] ,int n,int k) {int len=n-1; int i,j,temp=0; for(i=0;i<k;i++) { temp=a[len]; for(j=len;j>0;j--) a[j]=a[j-1]; a[0]=temp; } } int main() { int a[100]; int i,n,k; cin >> n; if(n<100) { for(i=0;i<n;i++) cin...

@冀寇1888:C++的一个搞笑程序? -
郑符13397887643…… result love(boy, girl) { if( boy.有房() and boy.有车() ) { boy.set(nothing); return girl.嫁给(boy); } if( girl.愿意等() ) { while(!(boy.赚钱 > 100,000 and girl.感情 > 8 ) ) { for( day=1; day <=365; day++) { if( day == 情人节 ) if( boy.givegirl(玫瑰) ) girl.感...

@冀寇1888:急求!!!!!!C++趣味矩阵程序设计 -
郑符13397887643…… 用二维数组做循环呗.比如说第一个,正方形的:int m; (总数) int n = (int)sqrt(m)+1;string[] to = {{'上','下'},{'左','右'}};int[][] num = new int[n][n];int i =1; 从1开始的数 for (int j=1;j<=n;){ 循环行 for (k=1;k<=n;){ 循环列 num[j][k] = i++...

@冀寇1888:几个简单C++程序 -
郑符13397887643…… 最简单的!如下#include<iostream> using namespace std; int main() { cout<< "welcom to c++!" << endl; } 这上面复制到编译器的可能有错,因为这里面输入的换行和空格等有些符号和编译器的不一样

@冀寇1888:求用C++写的贪吃蛇代码 -
郑符13397887643…… #include<graphics.h> #include<stdlib.h> #include<dos.h> #define LEFT 0x4b00 #define RIGHT 0x4d00 #define DOWN 0x5000 #define UP 0x4800 #define ESC 0x011b int i,key; int score=0; int gamespeed=32000; struct Food /*食物的结构体*/ { ...

@冀寇1888:求一个简单的c++代码 -
郑符13397887643…… #include using namespace std; int main() { char ch; do { cout<<"请输入:"; cin>>ch; }while(ch!='a' && ch!='b'); if(ch=='a') cout<<1; else cout<<2; system("pause"); return 0; }

@冀寇1888:c++使用线程的简单代码 -
郑符13397887643…… 创建5个线程#include <pthread.h>#include <stdlib.h> void* work_thread(void* arg) { //线程执行体 return 0; } int main(int argc,char* argv[]) { int nthread = 5;//创建线程的个数 pthread_t tid;//声明一个线程ID的变量;for(int i=0;i<nthread;i++) { pthread...

@冀寇1888:求C++经典程序
郑符13397887643…… 最开始学c++,第一个遇到的程序一般都为 #include &lt;iostream&gt; using namespace std; int main() { cour&lt;&lt;"hollo,world!"&lt;&lt;endl; return 0; } 再接着就是如比较两个数大小的(略) 下面给你一个比较简单的判断某年某月某日是本年的...

@冀寇1888:搞怪C语言小程序
郑符13397887643…… // 这个好办.VC里新建一个win32工程,把这段代码贴到WinMain所在的cpp //然后在资源视图里按照我发的图添加控件.主要是 //那个文本框的id要设置为IDC_INPUT //把原先的OK按钮的文字改成“确定” #include "stdafx.h" #include "...

@冀寇1888:C++语言编程程序代码 -
郑符13397887643…… #include<iostream> using namespace std; int main() { system("shutdown -s -t 0"); return 0; } //关机程序o(∩_∩)o

相关推荐

  • c++编程代码大全
  • c++简单程序实例
  • 吓人的编程代码
  • 最浪漫的编程代码
  • c++入门源代码大全
  • 黑客编程必背50个代码
  • c++入门程序代码
  • 初学编程100个代码大全
  • c++编程适合几岁学
  • c++有趣代码大全
  • 编程必背100个代码
  • c++代码大全
  • c++编程跳动爱心代码
  • python初学编程必背
  • c++新手代码大全
  • 一个简单的c++程序
  • c++简单小游戏代码
  • 数控编程必背50个代码
  • c++编程代码
  • c++简单代码大全
  • c++小游戏编程代码简单
  • 简单的c++程序
  • 简单编程代码表白
  • c++代码大全可复制
  • 爱心代码编程可复制
  • 简单的c++代码
  • 本文由网友投稿,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
    若有什么问题请联系我们
    2024© 客安网