---
title: "负数转化为整数"
author: "aircoder"
date: "2013-10-01T12:02:25Z"
tags: []
categories: ["编程语言"]
slug: "untitled"
draft: false
lastmod: "2013-10-01T12:14:01Z"
id: 1949682
url: "https://aircoder.iteye.com/blog/1949682"
---

负数转化为整数
 int a = -1321313;
 12 
 13         printf("1a: %d\n",a);
 14         if (a < 0){
 15 
 16           a = -a;
 17         }
 18 
 19 
 20         printf("2a: %d\n",a);


 整数 转化为字符
 b= a%10;
 27 
 28          buff = b+'0';