Exercises
Write a CC to store number
10
in variable called x and number0x1A
in a variable called y. Also store the sum of x and y in a variable called z. Store the following string :Yag
likes
emojis
^_^
into a variable called a. Output a followed by x , y and z each in a new line. \Write a CC to find the datatype and value of the following variables :
{{$x := 10.0}}
{{$x := .Server.MemberCount}}
{{$x := 0xAB11615E}}
{{$x := .Channel.Name}}
{{$x := div 5 2.3}}
{{$x := currentTime}}
{{$x := .Member.Roles}}
{{$x := .User}}
{{$x := "ab\nc\\\"\n\\"}}
{{$x := .DoesNotExist}}
{{$x := ` ok
hi
hello
bye`}}
\
Predict the output of of the following code snippet :
{{$x := mult 3 2.5}} {{$y := div 10 $x}} {{$y1 := fdiv 10 $x}}
{{$z := sub 5 $y}} {{$a := div 18.0 $z}}
{{$x}} , {{$y}} , {{$y1}} , {{$z}} , {{$a}}
\
Predict the output of of the following code snippet :
{{$int := 015}} {{$value := fdiv $int (sub $int 1)}}
{{$value_int := add (toInt $value) 0xa05}}
{{$int}}, {{$value}}, {{$value_int}}
Write a CC to compute the radius of a circle given Area is 154 square units. Formula : Area = Pi * (r^2) ; assume Pi = 22/7. Also, find the perimeter of the circle divided by 3. (Perimeter = 2*Pi*r) How will you ensure that the answer is in form of a decimal number ?\
Last updated