源码求补码 摘要:解题思路:注意事项:参考代码:#include<stdio.h>char *fun(char a[]);int main(){ char a[17]; scanf("%s",&a); …… 题解列表 2021年03月26日 0 点赞 0 评论 715 浏览 评分:0.0
[编程入门]原码求补码-题解(Java代码) 摘要:解题思路:注意事项:参考代码:public static void main(String[] args) { Scanner sc = new Scanner(System.in); …… 题解列表 2021年01月24日 0 点赞 0 评论 819 浏览 评分:0.0
[编程入门]原码求补码-题解(C++代码) 摘要:解题思路: 正数的补码即其原码,负数的补码,除符号位取反加一(reverse、add1)注意事项: 参考代码:#include<bits/stdc++.h> using …… 题解列表 2020年09月12日 0 点赞 0 评论 1460 浏览 评分:6.0
[编程入门]原码求补码-题解(C语言代码) 摘要:只能用字符型,整形的好像不对 #include "stdio.h" int main() { int i; char a[17]; gets(a); if(a[0]…… 题解列表 2020年02月12日 0 点赞 0 评论 1269 浏览 评分:0.0
[编程入门]原码求补码-题解(C++代码) #思路正数,不变。负数,符号位不变,其余位取反加一。#代码```cpp#include#includeintmain(){std::stringstr;std::cin>>str;//负数,符号位不变,其余位取反加一if('1'==str[0]){intlen=str.length();//取反for 题解列表 2020年01月01日 0 点赞 0 评论 1118 浏览 评分:0.0
[编程入门]原码求补码-题解(C语言代码) #includeintmain(){chara[17];inti;gets(a);/*第0位是符号位,因此从1开始*/for(i=1;i 题解列表 2019年12月18日 0 点赞 0 评论 1638 浏览 评分:0.0
[编程入门]原码求补码-题解(C语言代码)满分题解!! ####注意讨论0的补码#####参考代码:#include#includeintmain(){charx[20];charans[20]={'0','\0'};inti,j,k;gets(x);strcat(ans,x);for(i=2;i=1;i--){if(ans[i]>='2')ans[i]= 题解列表 2019年12月05日 0 点赞 1 评论 1980 浏览 评分:9.9
[编程入门]原码求补码-题解(C++代码) 摘要: #include #include #include using namespace std; int main() { string s1; cin>>s1; for(i…… 题解列表 2019年07月23日 0 点赞 0 评论 1567 浏览 评分:2.0
C语言程序设计教程(第三版)课后习题12.6 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <math.h>int t;void f(int a){ if(a == 0) return; e…… 题解列表 2019年01月14日 0 点赞 0 评论 926 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题12.6 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>void f(char a[]){ int i; if(a[0]=='1'){ for(i=1…… 题解列表 2019年01月08日 0 点赞 0 评论 881 浏览 评分:0.0