compare two digital
read -p "please input two numbers:" a b
if [ -z "$a" ] || [ -z "$b" ];then
echo " please input digital."
exit 2
fi
expr $a + 1 &> /dev/null
a1=
echo $?
expr $b + 1 &> /dev/null
b1=
echo $?
if [ "$a1" -ne 0 ] || [ "$b1" -ne 0 ];then
echo "you input is not digital."
fi
if [ $a -gt $b ];then
echo "$a is bigger than $b."
elif [ $a -eq $b ];then
echo "$a equal $b"
else
echo "$a is small than $b"
fi
compare two digital
相關推薦
compare two digital
linux bash#! /bin/bash read -p "please input two numbers:" a bif [ -z "$a" ] || [ -z "$b" ];thenecho " please input digi
How to Calculate McNemar's Test to Compare Two Machine Learning Classifiers
Tweet Share Share Google Plus The choice of a statistical hypothesis test is a challenging open
[Amazon] Two Strings Are Anagrams (Compare Strings)
Write a method anagram(s,t) to decide if two strings are anagrams or not. What is Anagram? - Two strings are anagram if they can
AI And Big Data: Two Major Parts of The Digital Future
If you follow technology news in any way, you've undoubtedly noticed that AI and Big Data are trending topics. Both technologies are certainly the driving
[LeetCode]160.Intersection of Two Linked Lists
col style return tro nod sts diff original you Intersection of Two Linked Lists Write a program to find the node at which the intersectio
Java多線程編程模式實戰指南(三):Two-phase Termination模式
增加 row throws mgr 額外 finally join table 還需 停止線程是一個目標簡單而實現卻不那麽簡單的任務。首先,Java沒有提供直接的API用於停止線程。此外,停止線程時還有一些額外的細節需要考慮,如待停止的線程處於阻塞(等待鎖)或者等待狀態(等
POJ 1849 Two(遍歷樹)
bold cost spa align div col sizeof 最小 turn POJ 1849 Two(遍歷樹) http://poj.org/problem?id=1849 題意: 有一顆n個結點的帶權的無向樹, 在s結點放兩個機器人,
Intersection of Two Arrays
func [] 空間 write example arraylist span ins 數組 Given two arrays, write a function to compute their intersection. Example Given nums1 =
leetcode鏈表--8、merge-two-sorted-list(按順序合並兩個已經排好序的鏈表)
截圖 技術 鏈表 兩個 16px sizeof 一個 運行結果截圖 div 題目描述 Merge two sorted linked lists and return it as a new list. The new list should be made by sp
[leetcode-583-Delete Operation for Two Strings]
code ngs alt splay ges exc ++ 分享 之前 Given two words word1 and word2, find the minimum number of steps required to make word1 and word2 th
Leetcode 21. Merge Two Sorted Lists
oge span solution clas next ini 遞歸解法 else get Merge two sorted linked lists and return it as a new list. The new list should be made by s
LeetCode---------Add Two Numbers 解法
eve n-n pty lead http 順序 number sum represent You are given two non-empty linked lists representing two non-negative integers. The digits
LeetCode 28 Divide Two Integers
範圍 long mod max article edi 優化 指數 故障 Divide two integers without using multiplication, division and mod operator. 思路:1.先將被除數和除數轉化為long的
167. Two Sum II - Input array is sorted
-s pointer spa sort for pro exit hang already Problem statement: Given an array of integers that is already sorted in ascending order, f
[LeetCode] Add Two Numbers
std 轉化 代碼 single ria 多種解法 ret data -m You are given two linked lists representing two non-negative numbers. The digits are stored in
HDU 1013.Digital Roots【模擬或數論】【8月16】
process clu auto white art cst int posit val Digital Roots Problem Description The digital root of a positive integer is found by su
4. Median of Two Sorted Arrays
中間 比較 median log pub math span pan osi 一、Description: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find
leetcode鏈表--14、add-two-numbers(兩鏈表相加 得到新鏈表)
logs 錯誤 align 描述 eight val str nodes sent 題目描述 You are given two linked lists representing two non-negative numbers. The digits are sto
【原創】Beyond Compare 萬能破解方法
use cnblogs users sse bash 主程 官網 support compare 一、Mac 平臺上的破解 在官網(http://www.scootersoftware.com/download.php)下載最新的 Beyond Compare 解壓後,
[leetcode-599-Minimum Index Sum of Two Lists]
sta art urg cond and st2 index mon 索引 Suppose Andy and Doris want to choose a restaurant for dinner, and they both have a list of favorit