日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

7-219 sdut-C语言实验-A+B for Input-Output Practice (不确定次数循环)7-220 sdut-C语言实验——两个数比较

發布時間:2024/3/12 编程问答 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 7-219 sdut-C语言实验-A+B for Input-Output Practice (不确定次数循环)7-220 sdut-C语言实验——两个数比较 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

目錄

7-219 sdut-C語言實驗-A+B for Input-Output Practice (不確定次數循環)

7-220 sdut-C語言實驗——兩個數比較


7-219 sdut-C語言實驗-A+B for Input-Output Practice (不確定次數循環)

分數?10

全屏瀏覽題目

切換布局

作者?馬新娟

單位?山東理工大學

Your task is to Calculate a + b.

Too easy?! Of course! I specially designed the problem for acm beginners.

You must have found that some problems have the same titles with this one, yes, all these problems were designed for the same aim.

輸入格式:

The input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line.

輸出格式:

For each pair of input integers a and b you should output the sum of a and b in one line, and with one line of output for each line in input.

輸入樣例:

1 5 10 20

輸出樣例:

在這里給出相應的輸出。例如:

6 30

代碼如下:

#include "stdio.h" int a,b; int main() {while(scanf("%d%d",&a,&b)!= EOF){printf("%d\n",a+b);} }

?

7-220 sdut-C語言實驗——兩個數比較

分數?10

全屏瀏覽題目

切換布局

作者?馬新娟

單位?山東理工大學

求2個數中較大者。

輸入格式:

第一行為測試的數據組數N,接下來的N行分別是兩個待比較的整數。

輸出格式:

輸出N行,每一行的值為每組數中較大的整數。

輸入樣例:

2 1 2 15 10

輸出樣例:

在這里給出相應的輸出。例如:

2 15

代碼如下:?

#include <stdio.h> int main(){int a;int x,y;scanf("%d",&a);for(int i = 0; i < a; i++){scanf("%d%d",&x,&y);x > y? printf("%d\n",x):printf("%d\n",y);}return 0; }

?

總結

以上是生活随笔為你收集整理的7-219 sdut-C语言实验-A+B for Input-Output Practice (不确定次数循环)7-220 sdut-C语言实验——两个数比较的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。