Difference between revisions of "C-and-Cpp/C2/If-And-Else-If-statement/Khasi"
From Script | Spoken-Tutorial
(3 intermediate revisions by the same user not shown) | |||
Line 588: | Line 588: | ||
| 11:44 | | 11:44 | ||
| Lada phim don ka bor internet ba khlain, phi lah ban shu download sa peit pat hadien. | | Lada phim don ka bor internet ba khlain, phi lah ban shu download sa peit pat hadien. | ||
− | |||
|- | |- | ||
Line 620: | Line 619: | ||
|- | |- | ||
| 12:20 | | 12:20 | ||
− | | La pynkylla sha ka ktien khasi da i Godwin pyrbot bad nga i John Nongkynrih. | + | | La pynkylla sha ka ktien khasi da i Godwin pyrbot bad nga i John Nongkynrih. Khublei naka bynta ba iasnohlang. |
− | + | ||
− | + | ||
− | + |
Latest revision as of 11:18, 12 October 2017
Time | Narration |
00:02 | Ngi pdiang sngewbha ia phi sha ka Spoken Tutorial halor ka Conditional statements in C and C++. |
00:08 | Ha kane ka jinghikai, ngin pule shaphang: |
00:11 | *Kumno ban execute ia ka wei ka statement |
00:14 | *Kumno ban execute ia ki kynhun jong ki statements. |
00:16 | Ngin leh ia kane lyngba ki nuksa. |
00:19 | Ngin peit ruh ia ki katto katne ki jingbakla bad ban pynbeit ia ki. |
00:25 | Ban record ia kane ka jinghikai, Nga pyndonkam da ka Ubuntu Operating system version 11.10. |
00:31 | gcc and g++ Compiler version 4.6.1. |
00:38 | To ngin sdang da ka jinglamphrang jong ka conditional statements. |
00:43 | Ka statement jong ka prokram ka control iaka jing iaid jong ka prokram execution. |
00:49 | Ka iarap ban ai ia ka rai halor uei u code dei ban execute. |
00:55 | Ngi lah ban check ia ka condition, la kadei ne ym dei. |
01:00 | Ngi lah ban execute ia kawei ka statement ne ka group jong ka statements. |
01:07 | To ngin pyrshang ban sngewthuh ia ka flow jong ka if statements. |
01:13 | Hangne, lada ka condition ka dei te ka statement 1 kan execute. |
01:20 | Lada ka condition kam dei te ka statement 2 kan execute. |
01:29 | Mynta ngin peit ia ka flow jong ka else if statement. |
01:32 | Hangne, if condition 1 ka dei te ka statement 1 kan execute. |
01:41 | Lada ka condition 1' kam dei te kan check da kawei patka condtion kata ka long condition 2. |
01:49 | Lada ka condition 2 ka dei te ka statement 3 kan execute. |
01:54 | Bad lada ka condition 2 kam dei te ka statement 2 kan execute. |
02:02 | Mynta to ngin iaid pat sha ka prokram jong ngi. |
02:06 | Nga lah type ia u code halor ka editor. |
02:09 | Namarkata, to ngan plie ia ka. |
02:13 | Kynmaw ba ka kyrteng jong ka phail jong ngi ka long ifstmt.c. |
02:18 | Ha kane ka prokram ngin khein ia ka sum jong artylli ki number bad ngin check katto katne ki condition. |
02:26 | To ngan batai ia u code mynta. |
02:30 | Kane ka dei ka header file. Jong ngi. |
02:34 | Kane ka dei ka main() function jong ngi. |
02:38 | Hangne ngi lah pynpaw lai tylli ki integer variables a, b and sum. |
02:46 | Hangne ngi pan na ka bynta jong ka user input. |
02:49 | Ka User kan enter ia ka values jong u a bad b. |
02:52 | ki values yn lumlang hapoh ki variable a bad variable b. |
02:58 | Ka scanf() function kan pule ia ki data na ka console. |
03:02 | Nangta kan lum lang ruh ia ka jingmih ha ki variable. Ba lah ai. |
03:06 | Ka format specifier hapoh ka scanf() ka iarap ban tip ia ki jait data. |
03:10 | Kum hangne ngi don u %d, ka pyni ba ngi ia deal bad ki integer data type. |
03:18 | Hangne ngi add ia ki values jong u a and b. |
03:22 | Ngin lumlang ia ka jingmih hapoh ka sum. |
03:25 | Nangta ngi print ia ka jingmih. |
03:29 | Kane ka dei ka if statement jongngi. |
03:30 | Hangne, ngi check ia ka condition la ka sum ka heh ia ka 20. |
03:36 | Lada ka condition ka dei, nangta ngi print Sum ka heh ia ka 20. |
03:42 | Mynta to ngan comment ia kine ki lain. |
03:48 | Kane ka dei ka return statement jong ngi. |
03:51 | Mynta click Save. |
03:53 | Nyngkong ngin peit ia ka execution jong ka if statement. |
03:58 | Sngewbha plie ia ka terminal window da kaba nion Ctrl, Alt bad T keys ha kajuh ka por na ka keyboard jong phi. |
04:09 | Ban compile, type gcc space ifstmt dot c space -o space if bad nion Enter. |
04:20 | Ban execute, type ./if (dot slash if). Nion Enter. |
04:26 | Kan pyni kum |
04:27 | Enter the values of a and b. |
04:31 | Ngan ai ia ki values kum 10 bad 12. |
04:38 | Ia ka jingmih la pyni kum Sum of a and b is 22. Sum is greater than 20. |
04:45 | Mynta ngin phai biang sha ka prokram jong ngi. |
04:48 | Ngin check sa kawei pat ka condition. |
04:52 | To ngan weng noh ia ka comment nangne. |
04:56 | Ngan ai ia ka comment hangne. |
05:00 | Mynta click Save. |
05:03 | Kane ka dei ka else-if statementjongngi. |
05:05 | Hangne, ngi check sa kawei pat ka condition la ka Sum ka heh ban ia u 10. |
05:11 | Lada ka condition ka dei nangta ngi print 'Sum is greater than 10 and less than 20'. |
05:18 | Mynta ngin phai biang sha ka terminal jongngi. |
05:20 | Ai ban gin compile kumba mynshuwa. |
05:23 | Ai ba ngin execute kum mymshuwa. |
05:26 | Kan pyni kum |
05:28 | Enter the value of a and b. |
05:30 | Ngan ai ki values kum 10 and 2. |
05:35 | ka jingmih la pyni kum: Sum of a and b is 12. |
05:38 | Sum is greater than 10 and less than 20. |
05:42 | Ai ngan pynshai ia ka prompt. |
05:44 | Mynta ngin phai biang sha ka prokram jongngi. |
05:48 | Ngan weng noh ia ka comment nangne bad hangne. Mynta click Save. |
05:56 | Lada baroh ar ki conditions ha jrong kim dei nangta ngi print 'Sum is less than 10'. |
06:04 | Kane ka dei ka else statement jong ngi. |
06:07 | Mynta ai ngin execute bad peit. Phai biang sha ka terminal jong ngi. |
06:11 | Ai ngin compile kumba mynshuwa. Ai ngin execute kum mynshuwa. |
06:18 | Hangne kan pyni kum |
06:19 | Enter the value of a and b. |
06:22 | Ngan ai ia ki values kum 3 bad 5. |
06:27 | Ka jingmih yn pyni kum sum of a and b is 8. |
06:31 | Sum is less than 10. |
06:34 | Mynta ngin peit katto katne ki jingbakla ba shait jia ba ngi juh lap. |
06:38 | Phai biang sha ka prokram jong ngi. |
06:41 | Tharai, hangne kaba khatduh jong ka if statement Ngan type ia u semicolon(;). |
06:47 | To ngin peit kaei ka ban jia. Click Save. |
06:50 | To ngin execute. Phai biang sha ka terminal jong ngi. |
06:53 | To ngin compile kum mynshuwa. |
06:56 | Ngi ioh i ia ka jingbakla: 'else' without a previous 'if' |
07:02 | Phai biang sha ka prokram jong ngi. Ka dei ka syntax error. |
07:07 | if statement kan ym terminate da u semicolon. |
07:10 | Bad ka else if statement kan ym treikam khlem ka if. |
07:16 | To ngin pynbeit ia ka jingbakla. Pyndam ia u semicolon (;) hangne. |
07:22 | Mynta Click Save. |
07:25 | To ngin execute. Phai biang sha ka terminal. |
07:29 | To ngin compile kum mynshuwa. To ngin execute kum mynshuwa. |
07:35 | Enter ia ki a bad b. |
07:37 | Ngan ai ia ki values kum 3 and 6. |
07:43 | Ka jingmih yn pyni kum |
07:45 | Sum of a and b is 9. Sum is less than 10. |
07:52 | MYNTA NGIN IOHI KUMNO BAN EXECUTE IA KAJUH KA PROKRAK HA KA C++. |
07:57 | Phai biang sha ka prokram jong ngi. |
07:59 | Ngan pynkylla ia katto katne hangne. |
08:03 | Nion Shift, Ctrl and S keys ha kajuh ka por na ka keyboard jong phi. |
08:11 | Mynta save ia ka phail da ka extension dot cpp bad click Save. |
08:20 | Ngin pynkylla ia ka header phail kum iostream. |
08:26 | To ngin thep lang ia ka using statement hangne. |
08:30 | Mynta click ia ka search for bad replace text option. |
08:35 | To ngin bujli ia ka printf statement da ka cout statement. |
08:40 | Click Replace all bad click Close. |
08:46 | Mynta pyndam noh ia ki closing brackets hangne. |
08:49 | Bujli ia ka scanf() statement da ka cin statement. |
08:54 | Type cin bad two closing angle brackets >>. |
09:00 | Kumba ngi pyndonkam ka cin >> function ban pule ia u lain ha ka C++. |
09:05 | Mynta pyndam noh ia ka format specifiers. |
09:09 | Pyndam ia u comma bad ampersand &. |
09:12 | Pyndam ia u comma hangne bad type artylli ki closing angle brackets. |
09:17 | Sa shisien pyndam ia u ampersand bad ki closing brackets. Mynta click Save. |
09:25 | Hangne pyndam ia u closing braket bad comma. |
09:31 | Mynta pyndam ia u backslash n (\n) bad format specifier. |
09:37 | Mynta type artylli ki opening brackets. |
09:42 | Sa shisien pat type artylli ki opening angle brackets bad within the double quotes type backslash n “\n”. |
09:49 | Hangne ruh ngin pyndam ia u closing bracket. |
09:53 | Mynta sa shisien pat ngin pyndam ia u closing bracket hangne. |
09:59 | Mynta click Save. |
10:02 | To ngin execute. |
10:04 | Phai biang sha ka terminal. To ngan pyndam ia ka prompt. |
10:10 | Ban compile, type g++ space ifstmt.cpp space -o space if1 |
10:20 | Hangne ngi ngi don ka 'if1' namar ba ngim kwah ban thoh iaka juh ha ka output parameter if for the file 'ifstmt.c'. |
10:31 | Mynta nion 'Enter'. |
10:32 | Ban execute type ./if1 (dot slash if1) bad nion Enter. |
10:39 | Enter ia ki value jong u a and b. Ngan ai ia ki values kum 20 and 10. |
10:48 | Ka jingmih yn pyni kum Sum of a and b is 30 |
10:52 | Sum is greater than 20 |
10:56 | Mynta ngi la poi sha ba kut jong kane ka jinghikai. |
10:59 | Mynta ngin phai biang sha ki slides jong ngi. |
11:02 | To ngin ia batai lyngkot. |
11:04 | Ha kane ka jinghikai, ngi la nang ia ka “if” statement eg. If(condition), |
11:11 | Bad 'else if' statement eg. else if(condition). |
11:17 | Kum ka jingaibynta, |
11:18 | Thoh ia ka prokram ban check la u 'a' u heh ban ia u 'b' lane duna ia u 'b'. |
11:24 | Hint: pyndonkam ka 'if' statement. |
11:28 | Thoh sa kawei pat ka prokram ban check u value aiu u bah eh 'a', 'b' ne 'c'. |
11:34 | Hint: Pyndonkam ka 'else-if' statement. |
11:38 | Peit ia ka video ba lah ban ioh naka link ba la pyni harum. |
11:41 | Ka batai lyngkot ia ka spoken tutorial project. |
11:44 | Lada phim don ka bor internet ba khlain, phi lah ban shu download sa peit pat hadien. |
11:48 | Ka team Spoken Tutorial Project, |
11:50 | :* ka pynlong ki workshop da ba pyndonkam ia ki spoken tutorials. |
11:54 | Yn ai syrnod ia kiba pass ia ka online test. |
11:57 | Na bynta ka jingtip ba kham bniah, sngewbha thoh sha kacontact@spoken-tutorial.org |
12:04 | “Spoken Tutorial” Project ka dei ka bynta jong ka Talk to a Teacher. |
12:09 | La kyrshan ia kane ka project da ka National Mission on Education lyngba ICT, MHRD, jong ka sorkar India. |
12:15 | Shuh shuh ki jingtip halor kane ka mission phin ioh na kane ka link ba la ai harum : http://spoken-tutorial.org\NMEICT-Intro. |
12:20 | La pynkylla sha ka ktien khasi da i Godwin pyrbot bad nga i John Nongkynrih. Khublei naka bynta ba iasnohlang. |