CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - INT 1
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Search - INT 1 - List
[
Console
]
Answer C2
DL : 0
实现标准库函数strstr的功能:在str1中查找str2,若找到,返回指向str1中第一次出现str2的位置; int A ( const char * str1, const char * str2 ); 没有的话,返回-1 有则返回所在位置(从0开始) 写出函数,对编写函数main完成对strstr的功能的验证。 -achieve the standard library functions strstr function : the search for str2 str1, if found, str1 return at the first appearance of str2 position; Int A (const char * str1, const char * str2); If not, the return -1 is returned with the location (from starting at 0) write function, the main function prepared to complete the function of the strstr certification.
Date
: 2008-10-13
Size
: 2.89kb
User
:
王鹏
[
Console
]
intToFloat
DL : 0
将int类型数据转化为float型。对于没有浮点运算器的平台非常适合。-will int data type conversion to float type. For no floating point unit is suitable for the platform.
Date
: 2008-10-13
Size
: 1.25kb
User
:
abc
[
Console
]
fraction
DL : 0
实现了C++的分数类,实现的分数与整数,分数与int,整数与int的混合操作,用多态和虚函数来实现digit_number()
Date
: 2008-10-13
Size
: 12.41kb
User
:
liang
[
Console
]
3
DL : 0
关于猎人过河问题 要解决这个问题就要使过河时载两个过河,返回时尽量只有一个回来。用一个字符串数组来存猎人,狼,羊,白菜;下标依次为0,1,2,3;但他们都有河这边和那边两种状态;为方便则定义一个结构,只含一个int型变量n;当在河这边时n设为0;在河那边时n设为1。由于每次过河与返回都要考虑狼能否吃羊或羊能否吃白菜;则需要一个函数来判断每次选择是否满足条件。
Date
: 2008-10-13
Size
: 5.91kb
User
:
STartBoy
[
Console
]
Answer C2
DL : 0
实现标准库函数strstr的功能:在str1中查找str2,若找到,返回指向str1中第一次出现str2的位置; int A ( const char * str1, const char * str2 ); 没有的话,返回-1 有则返回所在位置(从0开始) 写出函数,对编写函数main完成对strstr的功能的验证。 -achieve the standard library functions strstr function : the search for str2 str1, if found, str1 return at the first appearance of str2 position; Int A (const char* str1, const char* str2); If not, the return-1 is returned with the location (from starting at 0) write function, the main function prepared to complete the function of the strstr certification.
Date
: 2026-01-07
Size
: 3kb
User
:
王鹏
[
Console
]
fraction
DL : 0
实现了C++的分数类,实现的分数与整数,分数与int,整数与int的混合操作,用多态和虚函数来实现digit_number()-Realize the C++ The Score category, the scores and realize integer, scores and int, and int mixed integer operations, using virtual functions and polymorphism to achieve digit_number ()
Date
: 2026-01-07
Size
: 961kb
User
:
liang
[
Console
]
3
DL : 0
关于猎人过河问题 要解决这个问题就要使过河时载两个过河,返回时尽量只有一个回来。用一个字符串数组来存猎人,狼,羊,白菜;下标依次为0,1,2,3;但他们都有河这边和那边两种状态;为方便则定义一个结构,只含一个int型变量n;当在河这边时n设为0;在河那边时n设为1。由于每次过河与返回都要考虑狼能否吃羊或羊能否吃白菜;则需要一个函数来判断每次选择是否满足条件。-Hunters across the river on the issues to resolve this issue so we should cross the river when the two set out across the river to return to when there is only one back as far as possible. Using a string array to keep hunters, the wolf, sheep, and cabbage subscript followed by 0,1,2,3 but they have a river here and there two states To facilitate the definition of a structure containing only an int variable n When in the river here when n is set to 0 in the river when n is set to one side. Due to cross the river and return each time to consider whether the wolf can eat the sheep吃羊or cabbage you need a function to determine each choose whether or not to meet the conditions.
Date
: 2026-01-07
Size
: 150kb
User
:
STartBoy
[
Console
]
int-to-string
DL : 0
int to string;int t o string;int t o string;int t o string;int t o string;int t o string;int to string;-int to string;
Date
: 2026-01-07
Size
: 2kb
User
:
shede223
[
Console
]
TotalEven
DL : 0
Recursive function Called int TotalEven (int * numbers, int size, int * odd). This function takes an array of numbers, size and pointer to any number (in main) numbers representing the number of e - pair. Put function to odd numbers the number of the island - double and returns the number of paired numbers. For example: 1,2,3,4,5 spoiled returns 2 (because there are two even numbers) and insert to the odd 3.-Recursive function Called int TotalEven (int * numbers, int size, int * odd). This function takes an array of numbers, size and pointer to any number (in main) numbers representing the number of e - pair. Put function to odd numbers the number of the island - double and returns the number of paired numbers. For example: 1,2,3,4,5 spoiled returns 2 (because there are two even numbers) and insert to the odd 3.
Date
: 2026-01-07
Size
: 82kb
User
:
YTK
[
Console
]
Palindrom
DL : 0
This a recursive function, without loops titled: int is_palindrom (char arr [], int len) Accepts an array of characters and length. The function return 1 if the array contains a palindrome (a series of characters that particular cry from the beginning to the end identical to the call storm onset), 0 otherwise-This is a recursive function, without loops titled: int is_palindrom (char arr [], int len) Accepts an array of characters and length. The function return 1 if the array contains a palindrome (a series of characters that particular cry from the beginning to the end identical to the call storm onset), 0 otherwise
Date
: 2026-01-07
Size
: 92kb
User
:
YTK
[
Console
]
list
DL : 0
void print(void) //遍历链表输出 int length(void) //求链表长度 void insert_head(double value) //链头插入 void insert_tail(double value) //链尾插入 void insert_k(int k, double value) //第k个元素后插入 void delete_head(void) //链头结点删除 void delete_tail(void) //链尾结点删除 void delete_k(int k) //删除第k个结点 void inverse(void) //链表逆置 void destroy(void) //链表销毁 void add(mylist &list) //两个链表合并 mylist& operator=(mylist &list) //赋值运算符重载-void print(void) //遍历链表输出 int length(void) //求链表长度 void insert_head(double value) //链头插入 void insert_tail(double value) //链尾插入 void insert_k(int k, double value) //第k个元素后插入 void delete_head(void) //链头结点删除 void delete_tail(void) //链尾结点删除 void delete_k(int k) //删除第k个结点 void inverse(void) //链表逆置 void destroy(void) //链表销毁 void add(mylist &list) //两个链表合并 mylist& operator=(mylist &list) //赋值运算符重载
Date
: 2026-01-07
Size
: 10kb
User
:
王云翔
[
Console
]
list2
DL : 1
异质链表 void print(void) //遍历链表输出 int length(void) //求链表长度 void insert_head(double value) //链头插入 void insert_tail(double value) //链尾插入 void insert_k(int k, double value) //第k个元素后插入 void delete_head(void) //链头结点删除 void delete_tail(void) //链尾结点删除 void delete_k(int k) //删除第k个结点 void inverse(void) //链表逆置 void destroy(void) //链表销毁 void add(mylist &list) //两个链表合并 mylist& operator=(mylist &list) //赋值运算符重载-void print(void) //遍历链表输出 int length(void) //求链表长度 void insert_head(double value) //链头插入 void insert_tail(double value) //链尾插入 void insert_k(int k, double value) //第k个元素后插入 void delete_head(void) //链头结点删除 void delete_tail(void) //链尾结点删除 void delete_k(int k) //删除第k个结点 void inverse(void) //链表逆置 void destroy(void) //链表销毁 void add(mylist &list) //两个链表合并 mylist& operator=(mylist &list) //赋值运算符重载
Date
: 2026-01-07
Size
: 12kb
User
:
王云翔
[
Console
]
int
DL : 0
输入一个数字int转换成字符char,程序短小,适合练习!-int to char
Date
: 2026-01-07
Size
: 242kb
User
:
zfgn
[
Console
]
Expression-evaluation
DL : 0
输入中缀算术表达式S,S中的操作数为非负整数,只含+,-和*,/运算,也可能含有括号(),运算符的计算顺序和实际四则运算的计算顺序相同. 输出表达式S的值. 注意除法运算只取整数部分,例如1/2=0. Input 输入有多组数据. 每组数据是一个算术表达式S,S的长度不超过100. 输入的S保证合法,而且不包含多余的空格或制表符. S的操作数、中间结果和最终结果都不会超过int类型的范围,也不会出现除数为0的情况. 输入以#号结束. Output 对于每个算术表达式S,输出S的值,每个输出占一行.-Input infix arithmetic expression S operand S in a non-negative integer, containing only+,-,*,/operator, may also contain brackets (), the same as the order of the calculation of the calculation order of the operator and the actual four computing.the value of the output of the expression S Note divide operations take only integer part, for example, 1/2 = 0. Input Input a plurality of sets of data. Each set of data is an arithmetic expression S S length of no more than 100. Input S to ensure legitimate, but does not contain extra spaces or tabs. Operand of S, intermediate and final results will not exceed the int range of a type, and the divisor is 0, the situation does not occur. Input end with a# sign. Output For each of the arithmetic expression S, the output value of S, and each output per line.
Date
: 2026-01-07
Size
: 6.62mb
User
:
刘畅
[
Console
]
Post-Office
DL : 0
算法设计与分析中邮局选址问题。 select(int[] array, int begin, int end, int middle)将n个输入元素划分成n/5个组,每组5个 元素,只可能有一个组不是5个元素。用任意一种排序算法,将每组中的元素排好序,并取出每组的中 位数,共n/5个。找出这n/5个元素的中位数。如果n/5是偶数,就找它的2个中位数中较大的一个。 以这个元素作为划分基准。在调用时,只需要将middle参数传入array.length/2就能找到整个数组中的 中位数。然后调用两次computeDistance(int[] array)方法,分别求出各中位数到各个居民点的横坐标 和纵坐标的距离,将两距离相加即为该问题的最优解,最后将结果存入输出文件中。-Algorithm design and analysis problems in the post office location. select (int [] array, int begin, int end, int middle) n input elements will be divided into n/5 groups, 5 elements in each group, there may be only one group is not five elements. With any of the sorting algorithm, the elements of each group sorted and remove the median for each group of n/5 个. Median identify these n/5 elements. If n/5 is an even number, to find the median of its two larger one. With this element as the division benchmarks. When you call, simply middle parameter passed array.length/2 can be found in the median of the entire array. Then called twice computeDistance (int [] array) method, the median distance were calculated for each individual settlements to the horizontal and vertical coordinates, the distance will be the sum of the two is the optimal solution to this problem, the final results into the output file.
Date
: 2026-01-07
Size
: 165kb
User
:
[
Console
]
jisuanqi
DL : 0
自己写的计算器,写的玩的,CSTRING,之前类型是INT-Write your own calculator, written play, CSTRING, before the type is INT
Date
: 2026-01-07
Size
: 544kb
User
:
qiankai
[
Console
]
Cpp1
DL : 0
设计一个名为Account 类。这个类包含: (1)一个名为id 的int 型数据域,表示账户的身份号(默认值为0)。 (2)一个名为balance 的double 型数据域,表示账户余额(默认值为0)。 (3)一个名为annualInterestRate 的double 型数据域,保存当前年利率(默认值为0)。 (4)一个无实参构造函数,创建一个默认账户。 (5)id、balance 和annualInterestRate 的访问器和更改器函数。 (6)一个名为getMonthlyInterestRate()的函数,返回月利率。 (7)一个名为withDraw 的函数,从账户中支取指定金额。 (8)一个名为deposit 的函数,向账户中存入指定金额。 编写一个测试程序,它创建一个 Account 对象,其 ID 为 1122,账户余额为20000,年利率为4.5 。使用withDraw 函数取出2500 美元,使用deposit 函数存入3000 美元,然后输出账户余额、月利率和账户创建时间。-Design a class named Account. This class includes: (1) a data field called id int type, indicating the identity of the account number (default is 0). (2) a balance of the double data type called a domain, which means that the account balance (default is 0). (3) a double-data domain named annualInterestRate, and save the current interest rate (default is 0). (4) a no-argument constructor creates a default account. (5) id, balance and annualInterestRate access and change control functions. (6) a function named getMonthlyInterestRate () returns a monthly rate. (7) a function named withDraw, and withdraw a specified amount from the account. (8) a function called deposit to the account into a designated amount. Write a test program that creates an Account object, its ID is 1122, the account balance is 20,000, an interest rate of 4.5 . Use withDraw function takes $ 2,500, $ 3,000 deposit using deposit function, and then output the account balance, the interest rate and mont
Date
: 2026-01-07
Size
: 627kb
User
:
紫玉轩辕
[
Console
]
hugeint
DL : 0
C++的一个类HugeInt(头文件形式)实现大整数加,乘,乘方,能计算12345^3456等大数-A Class named HugeInt to compute huge int plus, times and so on
Date
: 2026-01-07
Size
: 2kb
User
:
李鹏程
[
Console
]
MAXInt
DL : 0
max int , simple project to demo
Date
: 2026-01-07
Size
: 1.33mb
User
:
New Mem
[
Console
]
High-precision-factorial
DL : 0
高精度阶乘运算,可以计算到很大的值,弥补了使用int型变量带来的数值限制-Precision factorial operation can be calculated to a large value, to make up for the numerical limit the use of int type variables to bring the
Date
: 2026-01-07
Size
: 1kb
User
:
杨奇
«
1
2
»
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.