当前位置:网站首页>Classic examples of C language - adding two scores
Classic examples of C language - adding two scores
2022-07-24 00:26:00 【Blue_ lan18】
# include <stdio.h>
int main()
{
int numerator1, numerator2;// Defining molecules
int denominator1, denominator2;// Define denominator
int numerator = 0;
int denominator = 0;
printf("Please input two fractions(Separate with\",\"): ");
scanf("%d/%d, %d/%d", &numerator1, &denominator1, &numerator2, &denominator2);
numerator = numerator1 * denominator2 + numerator2 * denominator1;// The molecule of the last fraction
denominator = denominator1 * denominator2;// The denominator of the last fraction
printf("result = %d/%d\n", numerator, denominator);
return 0;
}
The final result is not the simplest score .
边栏推荐
- 采坑websocket总结
- The universal esp32c3 configures partition tables based on the Arduino ide framework
- Detailed explanation of data warehouse standard -2022
- 通信模块整理(二)HC-05
- IIS deployment.Netcore
- 如何提升数据质量
- Lac automatic dialing experiment of L2TP
- As a programmer, is there anything you want to say to the newcomer?
- MySQL data query (select)
- EFCore高级Saas系统下单DbContext如何支持不同数据库的迁移
猜你喜欢

July 23, 2022 - mapper file description

docker搭建sonarqube,mysql5.7环境

Docker builds sonarqube, mysql5.7 environment

Detailed overview of data standards -2022

Redis主从同步机制

PayPal subscription process and API request

Flutter | specifies the type of page return value

vulnhub wpwn: 1

A good habit to develop when writing SQL

书写SQL必养成的好习惯
随机推荐
GBase 8c系统表信息函数(二)
What are blue-green deployment, Canary release and a/b test
Detailed explanation of data warehouse standard -2022
Redis持久化机制RDB、AOF
sed 深入理解与使用
mongodb的多数据源配置
GBase 8c 访问权限查询函数(二)
Gbase 8C system table information function (II)
win10下基于anaconda的detectron2安装
数据标准详细概述-2022
Reverse linked list drawing demonstration
Overview of data model design method
Take stock of 10 new layer1 to prepare for the next bull market
ES6 combines multiple class methods
Robot dog back submachine gun shooting video fire, netizens shivering: stoooooooopppp!
《天幕红尘》笔记与思考(五)强势文化与弱势文化
Material return on investment
docker 拉取redis镜像 并运行
I like investing
AWS Article 3 how to publish message to IOT mqtt in go language