自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

转载 c语言实现任意两个正数相乘

#include<stdio.h>#include<string.h>#define MAX_LEN 64void input(char* a){ int i=0; char temp=0; while(((temp=getchar())!='*') && (temp!='\n')) { a[i] = temp; ++i; } a[i]='\0...

2016-03-09 12:21:00 442

转载 c语言实现螺旋打印(4)

换一种方式思考,代码效率更高,运行速度更快,而且容易改为m*n的螺旋:总体思路:设定类似于贪吃蛇一样的走向增量(x,y),用step存放四个方向增量,如果遇到坐标超出矩阵范围,或者下一个位置已经有数据存在,就换下一个增量方向(向右扭头),直到放下所有数字。#include <stdio.h>#include <stdlib.h>int main...

2016-01-03 23:58:00 198

转载 c语言打印螺旋数字(3)

#include<stdio.h>int main(){ int n=0; int a[10][10]={1}; int i=0,j=0; printf("输入一个数:"); scanf("%d",&n); int x_max = n; int x_min = 0; int y_min = 0; int y_max = n; int x_index = 0; ...

2016-01-01 13:27:00 238

转载 C语言实现螺旋打印(2)

#include <stdio.h> #include <stdlib.h> int main( ) { int i,j,r,l,b,d,pl,N; int choose; do{ system("cls"); printf("\t\t************************************************\n"); print...

2016-01-01 09:59:00 136

转载 6进制数相乘

import java.io.*;/** * @author vigiking*/ public class BaseP{ public static void main(String[] args){ int[] a1 = new int[]{5,4,3,2,1,5,4,3,2,1}; //以6进制所表示的数int[] a2 = new int[]{1,2,3,...

2016-01-01 09:57:00 462

转载 C语言螺旋打印数字

#include <stdio.h>int main(){ int a[10][10], i, j, k=0, m, n; printf("输入n(n<10):\n"); scanf("%d",&n); if(n%2==0)m=n/2; else m=n/2+1; //m记录螺旋次数 for(i=0; i<m; i++...

2015-12-31 23:02:00 267

转载 C语言实现2的100次方

#include<stdio.h>#define MAXSIZE 1000int main(){ int i, j, n, mark = 0, carry = 0; int data[MAXSIZE] = { 1, 0 }; scanf("%d", &n); for (i = 0; i < n; i++) { for (j = 0, carry = 0; j...

2015-12-30 14:21:00 2655

转载 JAVA实现2的100次方

importjava.math.BigDecimal;public class Main { public static void main(String[] args) { System.out.println("2的100次方为:" + flexagon(100) ); } private static BigDecimalflexag...

2015-12-30 14:08:00 547

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除