簡單的a+b C語言網1000

來源:互聯網
上載者:User

標籤:程式   banner   ane   計算   語言   print   pre   ann   int   

問題 1000: 簡單的a+b

時間限制: 1Sec 記憶體限制: 128MB 提交: 5541 解決: 2127

題目描述

輸入兩個整數a和b,計算a+b的和

注意此題是多組測試資料

輸入

輸入兩個整數A和B

範圍不超過2^10

輸出

求A+B

範例輸入
1 110 20
範例輸出
230

代碼:

#include<stdio.h>
int main(){
    int a,b;
    while(~scanf("%d%d", &a, &b))printf("%d\n",a+b);
    return 0;
}

 

 

 

問題 1001: C語言程式設計教程(第三版)課後習題1.5

時間限制: 1Sec 記憶體限制: 128MB 提交: 6604 解決: 2526

題目描述

請參照本章例題,編寫一個C程式,輸出以下資訊:

**************************
Hello World!
**************************

Hello與World之間有一個空格

*也是輸出的一部分,別光列印Hello World!

輸入

無需輸入

輸出

**************************
Hello World!
**************************

範例輸入
範例輸出
**************************Hello World!**************************


代碼:
(1)
#include<stdio.h>
int main(){
   printf("**************************\nHello World!\n**************************\n");
}

(2)
#include<stdio.h>
int main(){
   printf("**************************");
printf("\n");
printf("Hello World!");
printf("\n");
printf("**************************");
}

     (3)
#include<stdio.h>
int main(){
   printf("**************************\n");
printf("Hello World!\n");
printf("**************************\n");
}

簡單的a+b C語言網1000

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.