#include <stdio.h>
#include "string.h"
#define N 5
struct date
{
int month;
int day;
int year;
};
typedef struct /*自定义结构体*/
{ int num ; /*编号*/
char name[10]; /*姓名*/
......................
阅读全部
|
虎啸邪
贴于 2012年6月12日 18:16
hide
bbsi
#include <stdio.h>
#include "string.h"
#define N 5
struct date
{
int month;
int day;
int year;
};
typedef struct /*自定义结构体*/
{ int num ; /*编号*/
char name[10]; /*姓名*/
......................
阅读全部
|
虎啸邪
贴于 2012年6月12日 18:16
hide
bbsi
#include <stdio.h>
struct stu
{
char name[10];
int num;
int age;
char addr[15];
}boya[3],boyb[3],*pp,*qq;
main()
{
FILE *fp;
......................
阅读全部
|
chengjun0619
贴于 2012年6月10日 22:06
hide
bbsi
#include <stdio.h>
#include <string.h>
main()
{
FILE *fp;
char s[80],ch,key;
key=31;
if((fp=fopen("c:\\0.txt","r+"))==NULL)
{
printf("Cannot open file 0.txt");
getch();
exit(0);
......................
阅读全部
|
chengjun0619
贴于 2012年6月10日 22:03
hide
bbsi
公路收费系统模拟
设计内容:设计一个包含不少于10个收费站的高速公路网,公路里程和每公里的费用自行设定,编写程序模拟公路收费。
设计要求:选择合适的数据存储结构;(注:数据的输入可以是键盘输入或文件输入两种方式)输入上高速的收费站和下高速的收费站,系统计算两地之间的应缴费用。
阅读全部
|
紫暮梦夏
贴于 2012年6月10日 00:17
hide
bbsi
这是C++课程设计作业(至少要200行)可是我补不齐了。跪求各位大神帮忙补一下。补到接近200行就行了,要是哪位好心的话,再把你们补上的过程给小弟解释一下,小弟是初学者。很多问题都不是多会的。 跪谢啊啊!
急求啊,过了明天就要交的。
#include<stdio.h>
void PrintMonthCalender(int startDay,int days);/*函数原型*/
int GetWeekDay(int year,int month);/*函数原型*/
int GetMonthDays(int year,int month);/*函数原型*/
main()
{
int month,year;/*定义变量*/
......................
阅读全部
|
lnq0906
贴于 2012年6月9日 13:59
hide
bbsi
/*
将小写字母与汉字建立下下表所示的对应关系,则魔王说的话是:“天上一只鹅
地上一只鹅追鹅赶鹅下鹅蛋鹅恨鹅天上一只鹅地上一只鹅 "
----------------------------------------
t d s a e z g x n h
天 地 上 一只 鹅 追 赶 下 蛋 恨
----------------------------------------
*/
#include <stdio.h>
#include <stdlib.h>
#include<string.h>
......................
阅读全部
|
泥鳅小子
贴于 2012年6月9日 09:17
hide
bbsi
#include <iostream.h>
void main()
{
char a[10];
cin >> a;
cout << a << endl;
}
问题:如果输入的字符数超过十个,会不会引起数组越界?
阅读全部
|
JUao067
贴于 2012年6月7日 22:42
hide
bbsi
/*
String类: first、last、has、has_any、has_all、is_in、format
Array类: first、last、has、has_any、has_all、is_in、any_in、all_in
*/
var has_any = function() {
var list = arguments;
if (typeof(list[0])=='object') {
list = list[0];
}
var result = false;
for (var i=0; i<list.length; i++) {
if (this.has(list[i])) {
......................
阅读全部
|
静夜思
贴于 2012年6月7日 19:22
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年6月4日 19:19
hide
bbsi