---------------------------------------------------------------------------------------- // main.c // demo8 // Created by weichen on 14/12/18. // Copyright (c) 2014年 weichen. All rights reserved. #include <stdio.h> int main() { int a = 0; printf…
/// 取出栈底的数 func getAndRemoveLastElement(_ items: inout [Int]) -> Int { let value = items.remove(at: 0) if (items.isEmpty) { return value } let last = getAndRemoveLastElement(&items) items.insert(value, at: 0) return last } func reverse(_ items: ino…
package com.zuoye.test;//打印出所有的 "水仙花数 ",所谓 "水仙花数 "是指一个三位数,//其各位数字立方和等于该数本身.//例如:153是一个 "水仙花数 ",//因为153=1的三次方+5的三次方+3的三次方.public class Shuixian { public static void main(String[] args) { int a; int b; int c; int sum1=0; int su…