Ответы к упражнению (область видимости) — различия между версиями

Материал из Deeptown Manual
Перейти к: навигация, поиск
(minor updates)
м (Откат правок DanielBell91 (обсуждение) к версии Korvin)
Строка 23: Строка 23:
== Would Gandhi Use Social Media? ==
If Gandhi were alive today, would he use social media? He was never anti-technology, or even anti-changing with the times. Quite the opposite, actually. If Internet technologies and social networks were around, he would certainly have embraced them -- but with a conscious mindfulness of their strengths and weaknesses.
[[http://goodvillenews.com/Would-Gandhi-Use-Social-Media-J39i2S.html Would Gandhi Use Social Media?]]
[[http://goodvillenews.com/wk.html goodville news]]
== Student Goes From Homeless to Harvard ==
Despite being abandoned to homelessness by her parents, Dawn Loggins worked as a high school custodian by day and studied hard by night to become the first person from her school to ever be admitted to Harvard.
[[http://goodvillenews.com/Student-Goes-From-Homeless-to-Harvard-QX9Vg4.html Student Goes From Homeless to Harvard]]
[[http://goodvillenews.com/wk.html goodville news]]
== The Relationship Between Gifts & Community ==
Wherever I go and ask people what is missing from their lives, the most common answer (if they are not impoverished or seriously ill) is "community." What happened to community, and why dont we have it any more? There are many reasons the layout of suburbia, the disappearance of public space, the automobile and the television, the high mobility of people and jobs and, if you trace the "whys" a few levels down, they all implicate the money system.
[[http://goodvillenews.com/The-Relationship-Between-Gifts-Community-zbK8gw.html The Relationship Between Gifts & Community]]
[[http://goodvillenews.com/wk.html goodville news]]
== 10 Keys to Happier Living ==
Action for Happiness has developed the 10 Keys to Happier Living based on a review of the latest scientific research relating to happiness. Everyones path to happiness is different, but the research suggests these Ten Keys consistently tend to have a positive impact on peoples overall happiness and well-being.
[[http://goodvillenews.com/10-Keys-to-Happier-Living-vxnwik.html 10 Keys to Happier Living]]
[[http://goodvillenews.com/wk.html goodville news]]
== Nintendo Unveils Wii U Console ==
Nintendo Co. on Tuesday unveiled details of its Wii U videogame console to be launched late this year, featuring a tablet computer-like controller with touch-sensitive panel.
[[http://goodvillenews.com/Nintendo-Unveils-Wii-U-Console-mGg2T2.html Nintendo Unveils Wii U Console]]
[[http://goodvillenews.com/wk.html goodville news]]

Текущая версия на 14:42, 13 июля 2013

<source lang="kpp" line="1"> function f(const int p) {

   var x = 1, k = 2;
   print("x = #{x}, k = #{k}\n"); //(1) x = 1, k = 2
       x = 5;
       var k = 3;
       print("x = #{x}, k = #{k}\n"); //(2) x = 5, k = 3
   print("x = #{x}, k = #{k}\n"); //(3) x = 5, k = 2
   if (p > 5) {
       print("x = #{x}\n"); //(4) x = 5
   } else {
       var x = 10;
       var y = "hello";
       print("x = #{x}, #{y}\n"); //(5) x = 10, y = hello
       x = 6;
   print("x = #{x}\n"); //(6) x = 5
   print("#{y}"); //(7) ошибка времени компиляции (переменная не объявлена)

} </source>

Персональные инструменты
Пространства имён