Jump to content

Conditional structures: Difference between revisions

m
(+Stata)
Line 5,055:
gen a = cond(mod(_n, 2)==1, "A", "B")
list, noobs noheader
 
 
+---+
Line 5,068 ⟶ 5,067:
 
<lang stata>program isprime
argssca n = `0'
sca n=`n'
sca p = 1
if n<5 {
Line 5,102 ⟶ 5,100:
isprime `=10^12-11'
999999999989 is prime.</lang>
 
 
 
=={{header|Tcl}}==
1,336

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.