首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看C语言
刚开始学C语言,可能问题有点弱弱,大侠指导。
我自己编了一个小程序玩的,可是出了点问题,找不出原因:
#include<stdio.h>
void main()
{
  char a;
  int b;
  printf("do you like c?");
  scanf("%c",&a);
  b=a=='y'||'Y'?1:0;
  if(b) printf("work harder!");
  else
......................
阅读全部 | 吴小君 贴于 2012年1月3日 06:27     hide bbsi
书上让用结构体存放学生姓名 年龄 分数,然后按分数排序并输出。写到定义学生信息的时候出问题了。请知道的朋友给我一点指导。谢谢了!
下面是我写的程序
#include<stdio.h>
#include<malloc.h>
struct student    //定义一个结构体为student
{
    char name[50];//姓名
    int age;//年龄
    float score;//分数
};

void inlen(int * len0) //学生数量输入函数
......................
阅读全部 | jysliang 贴于 2012年1月1日 09:24     hide bbsi
void (*tree_get(void))(void) {
    void (*self)(void);

    self = tree_val[tree_idx];

    return self;
}
阅读全部 | dongmeteor 贴于 2012年1月1日 00:36     hide bbsi
#include"stdio.h"
#include"malloc.h"
#include"stdlib.h"
#include"string.h"
#define SIZE sizeof(struct student)
struct student{
    int Subject;
    struct student * next;
};
struct subject
{
    int subject;             //科目数,且规定一名教师教授一门课程
......................
阅读全部 | 西单小六 贴于 2011年12月30日 03:11     hide bbsi
这是主函数文件 CONTACT.C

#include "common.h"

int main ()
{
char choice
阅读全部 | edward_eric 贴于 2011年12月27日 00:40     hide bbsi
这是主函数文件 CONTACT.C

#include "common.h"

int main ()
{
char choice
阅读全部 | edward_eric 贴于 2011年12月27日 00:40     hide bbsi
这是主函数文件 CONTACT.C

#include "common.h"

int main ()
{
char choice
阅读全部 | edward_eric 贴于 2011年12月27日 00:39     hide bbsi
这是主函数文件 CONTACT.C

#include "common.h"

int main ()
{
char choice
阅读全部 | edward_eric 贴于 2011年12月27日 00:36     hide bbsi
这是主函数文件 main.c
#include <stdio.h>
#include "creaters.h"

int main ()
{
int choice;

printf( "Witch Coder do you want:\n"
"1.Header_Coder\n"
"2.Menu_Coder\n" );

......................
阅读全部 | edward_eric 贴于 2011年12月27日 00:34     hide bbsi
//-----------------------------------------------------------------------------------------------------------------------------------------//
//-----------------------------------------------------------------------------------------------------------------------------------------//
#include <stdio.h>
#include <time.h>
#include <windows.h>
#include <fstream.h>
#include <string.h>
#include <conio.h>
#pragma comment(lib,"winmm.lib")
#define NULL 0
#define LEN sizeof(struct books)/*定义结构体books的长度为LEN*/
#define FILENAME "workers.db"/*定义数据库文件名为books.db*/
......................
阅读全部 | 逝、忄 贴于 2011年12月24日 23:08     hide bbsi
上一页 165 166 167 168 169 170 171 172 173 174 下一页