搜索资源列表
用c编写的N*N的螺旋矩阵源代码
- /* 实现效果: 1 2 6 7 15 3 5 8 14 16 4 9 13 17 22 10 12 18 21 23 11 19 20 24 25 */ #include <stdio.h> #define N 5 //阶数,即N*N的螺旋矩阵 void main() { int i, j, num=1, a[N][N]; for(i=0; i<=N/2; i++) &nb
single_file_source
- DispHelper允许您调用一个非常简单的printf风格的语法的COM对象。 DispHelper可用于从C + +或即使是普通的C,它与大多数Windows编译器 包括DEV - CPP的Visual C+ +和LCC- WIN32。包括在您的项目DispHelper 不能简单,因为它是在压缩单个文件的版本。-DispHelper allows you to call COM objects with an extremely simple printf style synta
Hanoi
- 一个Hanoi的小游戏 void Hanoi(int n, char x,char y,char z) { if (n==1) { printf("%c %d %c\n",x,n,z) return } Hanoi(n-1,x,z,y) printf("%c %d %c\n",x,n,z) Hanoi(n-1,y,x,z) }-Hanoi in a game void Hanoi (int n, char x, char
c
- 经典c程序100例 【程序1】 题目:有1、2、3、4个数字,能组成多少个互不相同且无重复数字的三位数?都是多少? 1.程序分析:可填在百位、十位、个位的数字都是1、2、3、4。组成所有的排列后再去 掉不满足条件的排列。 2.程序源代码: main() { int i,j,k printf("\n") for(i=1 i<5 i++) /*以下为三重循环*/ for(j=1 j<5 j++) for (
myTestFunctor
- c++ 的 functor实现,支持c函数和成员函数,使用非常简单,源码带使用例子 包含头函数:#include "Functor.h" 初始化c函数指针 Functor< int, int, int, int, int, int > fun1( &FuncSum ) printf( "fun1: d\n", fun1.Exec( 1, 2, 3, 4, 5 ) ) Functor< int, int, int, int, int, int > f
littleprogramforC
- 一些以C語言撰寫的小程式,包括printf函數的實作、字串轉浮點數、浮點數轉字串以及最小擴張樹問題等等。-Some with small programs written in C language, including the printf function of the implementation, string float switch, float switch to the string and the minimum spanning tree problem and so on.
cpp2
- C,C++ Questions 1. Base class has some virtual method and derived class has a method with the same name. If we initialize the base class pointer with derived object,. calling of that virtual method will result in which method being called? a.
printf1
- c语言环境下的printf 源代码,具备多种数据类型的输出能力-c language environment printf source code, with the ability to output multiple data types
02
- /* 十进制输出 */ printf("int_a = #o\n",int_a) /* 带标识符八进制输出 */ printf("int_a = #x\n",int_a) /* 带标识符十六进制输出 */ printf("char_e = c\n",char_e) /* 字符输出 */ printf("float_pi = f\n",float_pi) /* 实型输出 */ printf("double_g = 15.14g\n",double_pi) /* 15位
03
- /* 十进制输出 */ printf("int_a = #o\n",int_a) /* 带标识符八进制输出 */ printf("int_a = #x\n",int_a) /* 带标识符十六进制输出 */ printf("char_e = c\n",char_e) /* 字符输出 */ printf("float_pi = f\n",float_pi) /* 实型输出 */ printf("double_g = 15.14g\n",double_pi) /* 15位
c
- 变温度为华氏摄氏度 然后让你知道温度为多少华氏摄氏度-#include <stdio.h> void main() { double f,c printf("请输入华氏温度:") scanf(" lf",&f) c=5.0/9.0*(f-32) printf("与华氏温度 .2lf对应的摄氏温度是: .2lf\n",f,c) }
printf-and-scanf
- C或C++中 printf和scanf函数的用法和特点。很实用,也很简单!-C or C++ in the printf and scanf function usage and characteristics. Very practical, very simple!
sysconvert
- 进制间的转换,顶顶顶,大学期间的作品,经供参考-#include<stdio.h> #include<math.h> int main(){ int b,c,i,j int d[10000] char a[37]={ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , A , B , C , D , E , F , G , H , I , J , K , L , M , N , O , P , Q
exe
- 求三角形面积 判断三角形的种类以计算面积-#include<stdio.h> #include<math.h> main() { double a,b,c,p,S,i printf("Input a,b,c\n") scanf(" lf lf lf",&a,&b,&c) if(a+b>c&&a+c>b&&b+c>a){ p=(a+b+c)/2 S=sqrt((p-a)*(p-b)*(p-c)
THERR
- hello world hello world, c++ automatic entry。printf 详细用法-hello world hello world, c++ automatic entry. printf detailed usage
printf
- C++小程序,实现将计算结果打印在程序界面中的功能-print the result in the program Window
1
- 4 examples to C that help you to understand C better
C - Hello World!
- The #include <stdio.h> is a preprocessor command. This command tells compiler to include the contents of stdio.h (standard input and output) file in the program. The stdio.h file contains functions such as scanf() and print() to take input and
Desktop
- In this program, an integer variable number is declared. The printf() function displays Enter an integer: on the screen. Then, the scanf() function reads an integer data from the user and stores in variable number. Finally, the value stored in
c语言练习题
- Exercise 5: ‘for’ and ‘do … while” repetition statements 1. Write a program which uses a do/while loop to print out the first 10 powers of 2 other than 0 (ie. it prints out the values of 21, 22, ..., 210). Use a for loop to do the same. 注意 po