For tab and Forr tab
1 usingSystem;2 usingSystem.Collections.Generic;3 usingSystem.Linq;4 usingSystem.Text;5 usingSystem.Threading.Tasks;6 7 namespaceSixth day _do_while cycle8 {9 class ProgramTen { One Static voidMain (string[] args) A { - for(inti = -; I <=999; i++) - { the - intBai = i/ -; - intShi = i% -/Ten; - intGE = i%Ten; + if(bai*bai*bai+shi*shi*shi+ge*ge*ge==i) - { +Console.WriteLine ("Narcissus number has {0}", i); A } at } - Console.readkey (); - } - } -}
1 usingSystem;2 usingSystem.Collections.Generic;3 usingSystem.Linq;4 usingSystem.Text;5 usingSystem.Threading.Tasks;6 7 namespaceSixth day _do_while cycle8 {9 class ProgramTen { One Static voidMain (string[] args) A { - intsum =0; - intn = -; the for(inti =1; I <=n; i+=2) - { -Sum + =i; - } + Console.WriteLine (sum); - Console.readkey (); + } A}
Within 100 all even and, all odd and, all integers and ...
. NET Basic Article _ Learning Note _ Sixth day _for Loop Grammar _ positive sequence output and reverse output