标题:关于二进制转换
取消只看楼主
NeQhk
Rank: 2
等 级:论坛游民
威 望:1
帖 子:164
专家分:85
注 册:2014-7-19
结帖率:69.23%
 问题点数:0 回复次数:1 
关于二进制转换
#include<stdio.h>
void to_binary(unsigned long n);

void main(){
    int n;
    scanf("%d",&n);
    if(1){
        printf("input one integer:\n");
        printf("output the binary:\n");
              to_binary(n);
    }

    void to_binary(unsigned long n){
        unsigned long n;
        int r=0;
        r=n%2;
        if(n>2){
            to_binary)(n);
         }
    }
C:\vc\cprogram\binary\binary.c(13) : error C2143: syntax error : missing ';' before 'type'
C:\vc\cprogram\binary\binary.c(15) : error C2143: syntax error : missing ';' before 'type'
C:\vc\cprogram\binary\binary.c(16) : error C2065: 'r' : undeclared identifier
C:\vc\cprogram\binary\binary.c(18) : error C2059: syntax error : ')'
这几个错误时哪里啊,谁帮我看下,
搜索更多相关主题的帖子: include before 二进制 
2014-10-18 08:48
NeQhk
Rank: 2
等 级:论坛游民
威 望:1
帖 子:164
专家分:85
注 册:2014-7-19
得分:0 
回复 3 楼 龙牙
我改过来,确实有些细节没注意,谢谢了
2014-10-18 23:37



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-437377-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.279406 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved