笔试题:Suggest a simple and fast way to multiply the input integer digit by 7。
来源:互联网 发布:阿里云 ecs 建站 教程 编辑:程序博客网 时间:2024/06/06 04:35
翻译:不使用乘法运算,使用简单且快捷的方式实现输入的数字乘以7。
解决方案:
#include "stdio.h"int main(int argc, char **argv ){ int a; printf("Please Input Your Number:\n"); scanf("%d", &a); printf("Before Multiplying, the number is:%d\n", a); int b=( (a<<3)-a ); printf("Caculation Results is:%d.\n", b);}
运行效果:
0 0
- 笔试题:Suggest a simple and fast way to multiply the input integer digit by 7。
- QueryBuilder: A Simple Way to Read and Write Query Strings
- Efficient way to multiply with 7
- a simple and easy way to export grid(grid view) to excel
- A Simple Way to Enable a Windows XP Look and Feel for VC++ 6.0 MFC Applications
- A SIMPLE WAY TO USE SELECT (socket)
- a simple way ,to programing or writting!
- A simple way to cure sleepless
- A Simple Algebraic Way to understand Quaternions and Rotations in 3D
- SpriteManager2d A simple way of drawing 2D objects to the screen
- A smart way to count the ONEs in an integer's binary form representation
- Caused by: java.lang.IllegalArgumentException: you must specify a way to create the tab indicator.
- 翻译 Scribe : a way to aggregate data and why not, to directly fill the HDFS?
- Efficient way to multiply with 7(快速乘以7)
- String Matching: The Simple way to implement String Matching
- A simple way to read an XML file in Java
- Simple way to repeat a String in java
- Dropout: A Simple Way to Prevent Neural Networks from Overfitting
- 统计某个字符数
- Maven实战(七)——常用Maven插件介绍(上)
- poj 3616 Milking Time dp+树状数组
- How to determine the correct setting for JOB_QUEUE_PROCESSES (Doc ID 578831.1)
- 计算机管理没有mysql服务项的解决方法
- 笔试题:Suggest a simple and fast way to multiply the input integer digit by 7。
- 算法-回溯
- 用直接插入排序法对单链表进行排序
- C语言查找最大值和最小值递归实现
- 查看Linux服务器版本
- linux通信机制总结
- mybatis配置文件写法
- 将HIBITMAP保存为bmp图片
- linuxrc与inittab的作用?