1052: 写一函数,将两个字符串连接 Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 343  Solved: 210[Submit][Status][Web Board] Description 写一函数,将两个字符串连接 Input 两行字符串 Output 链接后的字符串 Sample Input 123 abc Sample Output 123abc HINT   Source freeproblemset   水题. 做这道题正好练练指…
代码: #include<stdio.h> ], ]) { int i, j; ; c[i] != '\0'; i++); ; d[j] != '\0'; j++) { c[i++] = d[j]; } c[i] = '\0'; puts(c); ]; } int main() { ]; ]; gets_s(a); gets_s(b); fun(a, b); ; }…
题目:有两个指针pa,pb分别指向有两个数,a,b,请写一个函数交换两个指针的指向,也就是让pa指向b,让pb指向a,具体实现如下: #include<stdlib.h> #include<stdio.h> int swap_ptr(int ** pA, int ** pB) {     if (pA == NULL || pB == NULL)     {         return 0;     }     int * pTemp = *pA;     *pA = *pB;…
[提交][状态][讨论版] 题目描述 有一字符串,包含n个字符.写一函数,将此字符串中从第m个字符开始的全部字符复制成为另一个字符串. 输入 数字n 一行字符串 数字m 输出 从m开始的子串 样例输入 6 abcdef 3 样例输出 cdef #include <iostream> #include <string.h> using namespace std; int main() { int n,i,x; ]; cin>>n; ;i<n;i++) cin>…
题目:写一个函数,求一个字符串的长度,在main函数中输入字符串,并输出其长度. public class _038PrintLength { public static void main(String[] args) { printLength(); } private static void printLength() { Scanner scanner = new Scanner(System.in); System.out.println("请输入一个字符串 :"); Str…
import java.util.Scanner; /** * [程序38] * * 题目:写一个函数,求一个字符串的长度,在main函数中输入字符串,并输出其长度. * * @author James * */ public class 第三十八题统计字符串的长度 { public static void main(String[] args) { System.out.println("请输入一个字符串"); Scanner in = new Scanner(System.in);…
1050: 写一个函数,使给定的一个二维数组(3×3)转置,即行列互换 Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 154  Solved: 112[Submit][Status][Web Board] Description 写一个函数,使给定的一个二维数组(3×3)转置,即行列互换. Input 一个3x3的矩阵 Output 转置后的矩阵 Sample Input 1 2 3 4 5 6 7 8 9 Sample Output 1 4 7…
2558: 游起来吧!超妹! Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 7  Solved: 3[Submit][Status][Web Board] Description 夏天到了,无聊的超妹跑到了落雪湖里抓鱼吃.结果,游到湖的正中 央时被湖边保安看到了,保安要抓住超妹.我们假设落雪湖是一个半径为r的圆形,超妹在圆形的正中心,速度为1.保安由于不会游泳所以只能沿着湖的边缘奔 跑,速度为n.因为超妹在陆地上的速度是很快的,所以我们假设只要超妹…
用^来操作: public static int[] exchangeAB(int[] AB){ AB[0] = AB[0] ^ AB[1]; AB[1] = AB[0] ^ AB[1]; AB[0] = AB[0] ^ AB[1]; return AB; }…
You can Solve a Geometry Problem too Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6425    Accepted Submission(s): 3099 Problem Description Many geometry(几何)problems were designed in the ACM/I…