the sample input is:   And the sample output is ; 3 6 9                                      3   10 15 20                               5 Not   3 6 9                                   3 both inputs need to be in the output Description

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 22PE
icon
Related questions
Question

write in c language 

Note:
the sample input is:   And the sample output is ;

3 6 9                                      3  

10 15 20                               5

Not  

3 6 9                                   3

both inputs need to be in the output

Description

 

請寫一個程式找到三個數的最大公因數。

Please write a program to find the greatestcommon divisor of  three number.

 

Input

 

輸入會包含多筆測試資料,每筆測試資料一行,每行中有三個正整數,整數間會用一個空白隔開。

Input consist several test case, each test case a line. For every test case there are three integer in it and separate by a space.

 

Output

 

對每一筆測試資料輸出一行結果。

For each test case output the result in one line.

 

Sample Input 1.                    Sample Output 1

3 6 9                                               3
10 15 20                                          5
Description
請寫一個程式找到三個數的最大公因數。
Please write a program to find the greatestcommon divisor of three number.
Input
輸入會包含多筆測試資料,每筆測試資料一行,每行中有三個正整數,整數間會用一個空白隔開。
Input consist several test case, each test case a line. For every test case there are three integer in it and separate by a space
Output
對每一筆測試資料輸出一行結果。
For each test case output the result in one line.
Sample Input 1 E
Sample Output 1
3 69
10 15 20
Transcribed Image Text:Description 請寫一個程式找到三個數的最大公因數。 Please write a program to find the greatestcommon divisor of three number. Input 輸入會包含多筆測試資料,每筆測試資料一行,每行中有三個正整數,整數間會用一個空白隔開。 Input consist several test case, each test case a line. For every test case there are three integer in it and separate by a space Output 對每一筆測試資料輸出一行結果。 For each test case output the result in one line. Sample Input 1 E Sample Output 1 3 69 10 15 20
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
ADT and Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning