Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Processing_lecture
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
boonpeel
October 01, 2011
31
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Processing_lecture
if && for
boonpeel
October 01, 2011
More Decks by boonpeel
See All by boonpeel
ITCT 책자 목차
boonpeel
0
100
Featured
See All Featured
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Six Lessons from altMBA
skipperchong
29
4.5k
Crafting Experiences
bethany
1
380
Odyssey Design
rkendrick25
PRO
2
870
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
520
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Exploring anti-patterns in Rails
aemeredith
4
540
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.2k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
320
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
460
Transcript
오늘이 지나면 우리는 「쇼핑하러 갈 때, 우유 하나 사와. 아,
계란 있으면 6개 사와」라고 심부름을 부탁했다. 남편은 잠시 후, 우유를 6개 사왔다. 아내는 물었다. 아내「왜 우유를 6개나 사왔어!」 남편「계란이 있어서...」 이 개그를 이해하게 됩니다.
Әөח ‘҅ۆ’ , ‘ਬ’ী ೧ࢲ ߓਛणפ. * ҅ۆ, ਬ Ӓܻӝ
Ӓ۞ա ܻо ೞҊ र ݈ “҅ۆ!” “ਬ!”ੋ ҃ח ߹۽ח হणפ.
۠ ݈ٜ ਃೞѷભ. 우유 하나 사와. 아, 계란 있으면 6개 사와 딸기우유 하나 있으면 사다줘 없으면 말고 우유랑 계란이랑 밀가루랑 섞어서 케이크 만들어줘
먼저 배울 문법은 조건법입니다. 어떤 조건을 만족할 때, 무엇을 해라.
라고 이야기하고 싶을 때는 손쉽게 if 를 사용합니다. 사용법은 다음과 같습니다. if(ਗೞח ઑѤ) { ೧ঠೞח ੌ;} else if(ژ ܲ ઑѤ) {೧ঠ ೞח ੌ;} else {ب ب ইק ٸ ೧ঠೞח ੌ;}
if ѐੋਵ۽ ੋр ޙߨҗ ࢚ ਬࢎೞҊ ו՞פ. ޙਸ if
۽ ߄Լࠇद. ী व ਵݶ ইޖ Ѫب উ ࢎب غҊ, ۄݶ݅ ਵݶ व ખ ࢎҊ, ইޖ Ѫب হਵݶ वی ۄݶ ل ࢎ.
if(व){ } else if(व হҊ ۄݶ ) {व ࢎӝ;} else{
व ࢎӝ; ۄݶࢎӝ;} ݈ਸ ೞࠁפ ೠ о ઑѤ ݈Ҋ ৈ۞о ઑѤ ਃೡ ٸо ࢤӤפ. Ӓؘ۠ ஹೊఠח ࣘࢎܳ ޅঌইݡणפ. Ӓېࢲ operatorܳ ٜ݅যفणפ.
&& : and || : or == : equal ӒܻҊ
࢜۽ ߸ࣻ bool true,false݅ оמೞ. ইө ޙਸ োܳ ࢎਊ೧ࢲ ߄Լࠇद.
bool व; bool ۄݶ ; if(व){ } else if(!व &&
ۄݶ) {व ࢎӝ;} else{ व ࢎӝ; ۄݶࢎӝ;} ઑѤਸ ߄Լࠇद. वѤ ۄݶѤ ݡਸ ѱ ਵݶ ইޖ Ѫب উ ࢎب غ ݅ ইޖ Ѫب হਵݶ वی ۄݶਸ ࢎঠ ೠ.
if(व || ۄݶ){ } else{ व ࢎӝ; ۄݶࢎӝ;} ইө ࠂೠ
ޙ ۧѱ рױೞѱ ܻؾפ. ইܴ֎ਃ.
ইղ ݈ਸ ߄Լࠁݶ buyMilk(1); if(egg) { buyEgg(); buyEgg(); buyEgg(); buyEgg();
buyEgg(); buyEgg(); } Ӓ۞ա ؋ թಞ if(!egg)buyMilk(1); else { buyMilk(); buyMilk(); buyMilk(); buyMilk(); buyMilk(); buyMilk(); } ׳ќ ೞա৬ ਬ ৈࢽѐܳ Ӓ۰ࠁ. .
buyMilk(); buyMilk(); buyMilk(); buyMilk(); buyMilk(); buyMilk(); ࠗ࠙ Ѧ݀פ. ڙэ
ղਊਸ ӈଳѱ ৵ ۧѱ ҅ࣘ ॄঠೡөਃ. ஹೊఠ ো ౠ ߈ࠂী ъೞח Ѫ. Ӓ ݅ఀ ۠ ߈ࠂੋ ো ݆ਸబؘ Ӓ ٸ݃ ੌੌ ॳӝ ଵ ӈଳणפ Ӓېࢲ աৡ Ѫ ߈ࠂޙੑפ.
߈ࠂޙ Ѻੋ forޙ ۧѱ ࢎਊפ. for( ઑѤ; ݄݃ ઑѤ;
߸ചध) { ೧ঠ ೞח ੌ;} ഋੋ ഋకח ۧणפ. for(int i=0; i<10; i++) { rect(i*10, 100,100,100);} *Ѿҗܳ ஏ೧ࠇद.
forޙ ࣼ೧ ٸө दр ખ ਃפ. ޙਸ forޙਵ۽ ߄Լࠇद.
xઝ݅100ঀ ӝݶࢲ ਗਸ 5ѐ ӒܻҊ र.
ਘә ߔ݅ਗੋؘ ೠ׳ী য়݅ਗঀ য়ܲ. 1֙زউ ਘә 10%ܳ ୷ೠ. ୷
୨ঘ ҾӘೞ. float sum = 0.f; for( int moth = 1; month<=12; month++) { sum+= ((month-1)*5 +100)/10; } println(sum); *sum ߄Ӵী ա৬ח Ѫী
forޙ ࢎਊ оמפ. ޥܻࣗ?
߈ࠂغח Ѫٜী, ঠೞח ੋؙझо ೠ оо ইק ٸо . ౠ
ܻח 2ରਗ ࣁ҅ܳ ۽ ܖҊ, 3ରਗ ࣁ҅ী Ҋӝ ٸޙী ؊ Ӓۧ. ޖסח forޙਸ ࢎਊ೧ࢲ 25ѐ ਗਸ Ӓܽ Ѫ.
2 forޙਸ ਊ೧ࢲ ޖסܳ ٜ݅যࠁ. if ޙب ഝਊೞৈ ࠙ೡػ ޖסܳ
ٜ݅যࠁ!