Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
24
Task/Integer-comparison/ColdFusion/integer-comparison-1.cfm
Normal file
24
Task/Integer-comparison/ColdFusion/integer-comparison-1.cfm
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<cffunction name="CompareInteger">
|
||||
<cfargument name="Integer1" type="numeric">
|
||||
<cfargument name="Integer2" type="numeric">
|
||||
<cfset VARIABLES.Result = "" >
|
||||
<cfif ARGUMENTS.Integer1 LT ARGUMENTS.Integer2 >
|
||||
<cfset VARIABLES.Result = VARIABLES.Result & "(" & ARGUMENTS.Integer1 & " is less than " & ARGUMENTS.Integer2 & ")" >
|
||||
</cfif>
|
||||
<cfif ARGUMENTS.Integer1 LTE ARGUMENTS.Integer2 >
|
||||
<cfset VARIABLES.Result = VARIABLES.Result & "(" & ARGUMENTS.Integer1 & " is less than or equal to " & ARGUMENTS.Integer2 & ")" >
|
||||
</cfif>
|
||||
<cfif ARGUMENTS.Integer1 GT ARGUMENTS.Integer2 >
|
||||
<cfset VARIABLES.Result = VARIABLES.Result & "(" & ARGUMENTS.Integer1 & " is greater than " & ARGUMENTS.Integer2 & ")" >
|
||||
</cfif>
|
||||
<cfif ARGUMENTS.Integer1 GTE ARGUMENTS.Integer2 >
|
||||
<cfset VARIABLES.Result = VARIABLES.Result & "(" & ARGUMENTS.Integer1 & " is greater than or equal to " & ARGUMENTS.Integer2 & ")" >
|
||||
</cfif>
|
||||
<cfif ARGUMENTS.Integer1 EQ ARGUMENTS.Integer2 >
|
||||
<cfset VARIABLES.Result = VARIABLES.Result & "(" & ARGUMENTS.Integer1 & " is equal to " & ARGUMENTS.Integer2 & ")" >
|
||||
</cfif>
|
||||
<cfif ARGUMENTS.Integer1 NEQ ARGUMENTS.Integer2 >
|
||||
<cfset VARIABLES.Result = VARIABLES.Result & "(" & ARGUMENTS.Integer1 & " is not equal to " & ARGUMENTS.Integer2 & ")" >
|
||||
</cfif>
|
||||
<cfreturn VARIABLES.Result >
|
||||
</cffunction>
|
||||
24
Task/Integer-comparison/ColdFusion/integer-comparison-2.cfm
Normal file
24
Task/Integer-comparison/ColdFusion/integer-comparison-2.cfm
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<cfscript>
|
||||
function CompareInteger( Integer1, Integer2 ) {
|
||||
VARIABLES.Result = "";
|
||||
if ( ARGUMENTS.Integer1 LT ARGUMENTS.Integer2 ) {
|
||||
VARIABLES.Result = VARIABLES.Result & "(" & ARGUMENTS.Integer1 & " is less than " & ARGUMENTS.Integer2 & ")";
|
||||
}
|
||||
if ( ARGUMENTS.Integer1 LTE ARGUMENTS.Integer2 ) {
|
||||
VARIABLES.Result = VARIABLES.Result & "(" & ARGUMENTS.Integer1 & " is less than or equal to " & ARGUMENTS.Integer2 & ")";
|
||||
}
|
||||
if ( ARGUMENTS.Integer1 GT ARGUMENTS.Integer2 ) {
|
||||
VARIABLES.Result = VARIABLES.Result & "(" & ARGUMENTS.Integer1 & " is greater than " & ARGUMENTS.Integer2 & ")";
|
||||
}
|
||||
if ( ARGUMENTS.Integer1 GTE ARGUMENTS.Integer2 ) {
|
||||
VARIABLES.Result = VARIABLES.Result & "(" & ARGUMENTS.Integer1 & " is greater than or equal to " & ARGUMENTS.Integer2 & ")";
|
||||
}
|
||||
if ( ARGUMENTS.Integer1 EQ ARGUMENTS.Integer2 ) {
|
||||
VARIABLES.Result = VARIABLES.Result & "(" & ARGUMENTS.Integer1 & " is equal to " & ARGUMENTS.Integer2 & ")";
|
||||
}
|
||||
if ( ARGUMENTS.Integer1 NEQ ARGUMENTS.Integer2 ) {
|
||||
VARIABLES.Result = VARIABLES.Result & "(" & ARGUMENTS.Integer1 & " is not equal to " & ARGUMENTS.Integer2 & ")";
|
||||
}
|
||||
return VARIABLES.Result;
|
||||
}
|
||||
</cfscript>
|
||||
Loading…
Add table
Add a link
Reference in a new issue