Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - B-52
Search - B-52 - List
【问题描述】编写函数itob(n,s,b),用于把整数n转换成以b为基的字符串并存储到s中. 编写程序,使用函数itob(n,s,b)将输入的整数n,转换成字符串s,将s输出.转换后的字符串从最高的非零位开始输出。如果n为负数,则输出的字符串的第一个字符为’-’。b为大于1小于37的任意自然数值。当b=2时,输出字符只可能是’0’和’1’;当b=16时,输出字符串中可能含有字符为’0’-’9’,’a’-’f’(字母以小写输出)。b还可以是其它数值。比如输入n=33,b=17,则输出33的17进制值为"1g"。 【输入形式】控制台输入整数n和b,其中n可以为负数。n和b以空格分隔. 【输出形式】控制台输出转化后的字符串s. 【样例输入】5 2 【样例输出】101 【样例说明】5的二进制就是101 【评分标准】结果完全正确得20分,每个测试点4分。提交程序名为:itob.c-[Problem Description] Write a function itob (n, s, b), is used to convert the integer n base b string and stored in s. Written procedures, use the function itob (n, s, b) the input integer n, converted to a string s, the s output. strings converted from the highest non-zero bit to start output. If n is negative, the first character of the output is - . b is greater than a value of less than 37 of any nature. When b = 2, the output character can only be 0 and 1 When b = 16, the output string may contain characters 0 - 9 , a - f (letter in lower output). b may also be other values​ ​ . For example, enter n = 33, b = 17, the output 17 hex value "1g" 33 s. [Form] input console input integer n and b, where n can be negative. n and b separated by a space. [Output format] console output after conversion string s. Sample input [52] Sample output] 101 [Description] binary sample 5 is 101 [Standard] results entirely correct score 20 points, 4 points for each test poin
Date : 2026-01-07 Size : 354kb User : 服部半藏

DL : 0
实验实现邻接表表示下无向图的广度优先遍历。 程序的输入是图的顶点序列和边序列(顶点序列以*为结束标志,边序列以-1,-1为结束标志)。程序的输出为图的邻接表和广度优先遍历序列。例如: 程序输入为: a b c d e f * 0,1 0,4 1,4 1,5 2,3 2,5 3,5 -1,-1 程序的输出为: the ALGraph is a 4 1 b 5 4 0 c 5 3 d 5 2 e 1 0 f 3 2 1 the Breadth-First-Seacrh list:aebfdc - The experimental realization of the adjacency list shows the breadth first traversal of undirected graph. The input of the program is the sequence of vertices and edges of the graph (the end of the vertex sequence is a symbol, and the edge sequence is-1,-1 is the end symbol). The output of the program is the adjacency list and the breadth first traversal sequence. For example: Program input: A B C D E F * 0,1 0,4 1,4 1,5 2,3 2,5 3,5 -1,-1 The output of the program is: ALGraph is the A 41 B 540 C 53 D 52 E 10 F 321 Breadth-First-Seacrh list:aebfdc the
Date : 2026-01-07 Size : 1kb User : 王乐

DL : 0
本实验实现邻接表表示下无向图的广度优先遍历。 程序的输入是图的顶点序列和边序列(顶点序列以*为结束标志,边序列以-1,-1为结束标志)。程序的输出为图的邻接表和广度优先遍历序列。例如: 程序输入为: a b c d e f * 0,1 0,4 1,4 1,5 2,3 2,5 3,5 -1,-1 程序的输出为: the ALGraph is a 4 1 b 5 4 0 c 5 3 d 5 2 e 1 0 f 3 2 1 the Breadth-First-Seacrh list:aebfdc -In this experiment, the adjacency list shows the breadth first traversal of undirected graph. The input of the program is the sequence of vertices and edges of the graph (the end of the vertex sequence is a symbol, and the edge sequence is-1,-1 is the end symbol). The output of the program is the adjacency list and the breadth first traversal sequence. For example: Program input: A B C D E F * 0,1 0,4 1,4 1,5 2,3 2,5 3,5 -1,-1 The output of the program is: ALGraph is the A 41 B 540 C 53 D 52 E 10 F 321 Breadth-First-Seacrh list:aebfdc the
Date : 2026-01-07 Size : 1kb User : 王乐

DL : 0
利用给定条件进行高斯投影坐标计算,包括正算与反算: (a) 椭球采用教材 P100 表 4-1 中的任一椭球,计算流程见 P193 的 框图; (b) 使用大地坐标 B = 17°33′55.7339″, L = 119°15′52.1159″ 中央子午线纬度 117°,实现高斯投影坐标正算; (c) 使用正算得到的高斯投影坐标(x, y),实现高斯投影坐标反算 (d) 将正、反算计算的结果进行比较,检验计算成果。(Gauss's positive and negative calculation)
Date : 2026-01-07 Size : 266kb User : HAIM
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.