天天看點

ZCMU——1070: 判斷數的符号目錄題幹源代碼解題思路

目錄

  • 目錄
  • 題幹
        • 題目描述
        • 輸入
        • 輸出
        • 樣例輸入
        • 樣例輸出
  • 源代碼
  • 解題思路
    • >>>我的部落格<<<

題幹

題目描述

輸入一個正整數 repeat (0

輸入

見sample

輸出

見sample

樣例輸入

3

2 -8 0

樣例輸出

1

-1

源代碼

#include <stdio.h>
int main()
{
    int i,repeat;
    scanf("%d",&repeat);
    while(repeat--)
    {
        int x; 
        scanf("%d",&x);
        if(x>)
        printf("1\n");
        else if(x==)
        printf("0\n");
        else
        printf("-1\n");
    }
    return ;
}
//ENDING
           

解題思路

呵呵

呵呵呵

這道題沒有任何解題思路可言

希望你們喜歡這道題還有我的解題思路(呵呵)!!!

如有問題請留言,謝謝!!!

>>>我的部落格<<<

繼續閱讀