@C语言实验——逆置正整数
标签: C语言练习题
#include <stdio.h> int main () { int x,a,b,c,y; scanf ("%d",&x); a=x/100; b=x/10%10; c=x%10; y=a+b10+c100; printf ("%d",y); return 0; }
标签: C语言练习题
#include <stdio.h> int main () { int x,a,b,c,y; scanf ("%d",&x); a=x/100; b=x/10%10; c=x%10; y=a+b10+c100; printf ("%d",y); return 0; }
Problem Description ...逆置后的正整数。 Sample Input 123 Sample Output 321 Hint 注意130逆置后是31 Source crq 解法一: #include <stdio.h> #include <stdlib.h> int main() { ...
输入:3位正整数输出:输出逆置后的正整数(去除前导0)样例输入:123样例输出:321注意:130逆置后是31考点:对数字精度的理解代码: #include <stdio.h> int main() { int x; int a,b,c; ...
逆置后的正整数。 Sample Input 123 Output 321 Hint 注意130逆置后是31 #include<stdio.h> int main() { int x,a,b,c; scanf("%d",&x); a=x%10; b=x/10%10; c=x/100; printf("%d",..
C语言实验——逆置正整数 a = input() a = int(a) b = 0 b = int(b) c = 100 c = int(c) while a &gt; 0: b += (a%10)*c a /= 10 a = int(a) c /= 10 b = int(b) print(str(b))
标签: c语言
C语言逆置正整数123输入一个三位整数,将带反向输出,注意130逆置之后是31
Problem Description 输入一个三位正整数,将它...逆置后的正整数。 Sample Input 123 Sample Output 321 Hint 注意130逆置后是31 import java.util.*; public class Main{ public static void main(St...
Problem Description 输入一个三位正整数,将它反向...逆置后的正整数。 Sample Input 123 Sample Output 321 Hint 注意130逆置后是31 # -*- coding:utf-8 -*- a=int(input()) b=1 c='' while a>0: i...
标签: c语言
include int main(void) { int a, b, c; scanf("%d%d%d",&a,&b,&c); if(c = 0) printf("%d%d\n",b, a); else printf("%d%d%d\n",c... } 这个为什么不能实现逆置正整数,运行的时候回车没有显示输出的东西,不知道为什么
C语言实验——逆置正整数 Time Limit: 1000MS Memory Limit: 65536KB Problem Description 输入一个三位正整数,将它反向输出。 Input 3位正整数。 Output 逆置后...
A- A+B Problem(SDUT 1000)import java.util.Scanner;public class Main {public static void main(String[] args) {Scanner sc = new Scanner(System.in);int a, b;a = sc.nextInt();b = sc.nextInt();...
PTA:7-71 sdut-C语言实验——逆置正整数 作者马新娟 单位山东理工大学
SDUT OnlineJudge #include<iostream> using namespace std; int main() { int a,b,c,d; cin>>a; b=a%10; c=a/10%10; d=a/100%10; int key[3]; key[0]=b; key[1]=c; key[2]=d;...key[i.
输入一个三位正整数,将它反向输出。注意130逆置后是31。
C语言实验——逆置正整数 Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^ 题目描述 输入一个三位正整数,将它反向输出。 输入 3位正整数。 输出 逆置后的正整数。 示例输入 123 示例输出 321 ...
标签: c++
#include<stdio.h> int main() { int a,b,c,n; scanf("%d",&n); a=n/100; b=n/10%10*10; c=n%10*100; printf("%d",c+b+a); return 0; }
逆置正整数 http://acm.tzc.edu.cn/acmhome/problemdetail.do?&method=showdetail&id=1472 时间限制(普通/Java):1000MS/10000MS 运行内存限制:65536KByte 描述 输入一个三位正整数,将它反向输出。 ...
山东理工ACM 1189 C语言实验——逆置正整数(升级版解法) Time Limit: 1000 ms Memory Limit: 65536 KiB Problem Description 输入一个三位正整数,将它反向输出。 Input 3位正整数。 Output 逆置后的正...
输出逆置后的正整数(去除前导0) 样例输入 123 样例输出 321 提示 注意: 130逆置后是31 /* Name: 1472 Copyright: Author: TonyZheng Date: 26/09/18 11:06 Description: a是三位正整数 b是取余数 c是...
C语言实验——逆置正整数 Time Limit: 1000 ms Memory Limit: 65536 KiB Problem Description 输入一个三位正整数,将它反向输出。 Input 3位正整数。 Output 逆置后的正整数。 Sample Input 123 Sample Output 321 ...
输出:逆置后的正整数 代码: /* 问题描述:输入一个三位正整数,将它反向输出。 作者:何知令 发表时间:2017年2月23日 输入:3位正整数 输出:逆置后的正整数 */ #include #include int main() { int i; int
个人学习记录,仅供参考