C++ සිංහලෙන්

imscncl

Well-known member
  • Jul 8, 2008
    1,447
    186
    63
    ලoකාවෙ
    Part 2

    [FONT=&quot]Ok අද මමඔ යාලට කියලා දෙන්නම් අපි කලින් ලියපු program එක කොහමද ලියලා තියෙන්නෙ කියලා.[/FONT][FONT=&quot][/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot]#include <iostream.h>[/FONT]
    [FONT=&quot]void main () [/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot]මෙ රතු පාට ටික[FONT=&quot] program එක ලියන කොට අනිවාර්යෙන්ම ලියන්න ඕන ටිකක්.[/FONT][FONT=&quot][/FONT][/FONT]
    [FONT=&quot]මේක හැම program එකකම ලිය යුතුයි.[/FONT][FONT=&quot][/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot]{[/FONT]
    [FONT=&quot]මෙ සගල වරහන ඇරලා තමා අපට අවශ‍ය දේ ලියන්න පටන් ගන්නෙ.[/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot]cout<< “Hello world ” ;[/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot]අපි[FONT=&quot] program එකෙන් එලියට දෙන යමක් සදහා[/FONT][/FONT][FONT=&quot] cout<<[/FONT][FONT=&quot] යන්න හාවිතා කරයි.[/FONT]
    [FONT=&quot]අපි ඒ එලියට දෙන දෙය ප්‍රෙකාසනයක් නම් “ “ තුල එය සදහන් කල යුතුයි.[/FONT]
    [FONT=&quot]අපි ලියපු එක අවාසානය අනිවාර්යෙන්ම ; කින් අවසන් කල යුතුයි.[/FONT]
    [FONT=&quot]ඔයාලට දැන් මේකෙ තියන[/FONT][FONT=&quot] Hello world [/FONT][FONT=&quot]වචනය වෙනස් කරලා අත් හදා බලන්න පුලුවන්[/FONT]
    [FONT=&quot]හරි දැන් කට්ටියට ප්‍රස්නයක් ඇති එලියට දෙනවා වගේම යමක් අතුල් කරන්නෙ කොහමද කියලා. එක කරන්නෙත් කලින් විඩියටම cin>> යන්න බාවිතා කරලා.[/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot]}[/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot]සගල වරහන වහලා තමා අපි[FONT=&quot] program එක අවසන් කරන්නෙ.[/FONT][FONT=&quot][/FONT][/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot]දැනට නිකන් greek වගේ අති එත් program 2,3ක් ලියද්දි මෙවා නිකන්ම තේරෙනවා.[/FONT][FONT=&quot][/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot]******************************************************************[/FONT][FONT=&quot][/FONT]
    [FONT=&quot]අපි අද පියවර ටිකක් තියන program එකක් ලියමු.[/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot]මේකයි program එක අපි දෙන යම් අගයක දෙගුනය ලබාගැනිම.[/FONT]
    [FONT=&quot](මේ වැඩේට program එකක් ලියන්න ඕනද කියලා හිතුනා නේද,[/FONT]
    [FONT=&quot]මේවගෙ සරල දෙයක් ලීවීමෙන් program ලියන හැටි තේරුම් ගන්න ලේසියි.[/FONT]
    [FONT=&quot]ඒක නිසා මම ඉතා සරල දෙවල් යොදා ගන්නවා[/FONT][FONT=&quot] )[/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot]මේකට අලුතින් පියවර කිහිපයක් කරන්න තියනවා කලින් program එකට වඩා.[/FONT]
    [FONT=&quot]එවා තමයි[/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot]1. [/FONT][FONT=&quot]අපි දෙගුනය ලබා ගැනිමට යම් අගයක් ලබා දෙන්නෙ කෙසේද?[/FONT]
    [FONT=&quot]ඒ සදහා අපි අලුතින් cin>> යන්න භාවිතා කරනවා.[/FONT]
    [FONT=&quot]මේ ලබා දෙන අගය මතක තබා ගැනිමට veriabal එකක් නිර්මානය කරගන්න ඕන.[/FONT]
    [FONT=&quot]අපි මෙතනදි අතුලත් කරන්නෙ ඉලක්කමකි.[/FONT]
    [FONT=&quot]Variable එකක් ලෙස ඉලක්කමක් යොදා ගැනීමෙ දිභාවිතා කරන Keyword [/FONT]
    [FONT=&quot]කිහිපයක් පවතිනවා.[/FONT]
    [FONT=&quot]1. [/FONT][FONT=&quot]int[/FONT][FONT=&quot] මෙය කුඩා අගයන් අතුලත් කිරීමට යොදා ගන්නවා.[/FONT]
    [FONT=&quot]2. [/FONT][FONT=&quot]float[/FONT][FONT=&quot] මෙය මධයම ප්‍රෙමානයෙ අගයන් අතුලත් කිරීමට යොදා ගන්නවා.[/FONT]
    [FONT=&quot]3. [/FONT][FONT=&quot]double[/FONT][FONT=&quot] මෙය විශාල අගයන් අතුලත් කිරීමට යොදා ගන්නවා.[/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot]අපි යොදා ගන්න අගයන් මධයම ප්‍රෙමානයෙ යැයි සිතා මෙ සදහා[/FONT]
    [FONT=&quot]float එක යොදාගමු.[/FONT]
    [FONT=&quot]අපි ඇතුලත් කරන අගය මතක තබා ගැනීමට යොදා ගන්නා[/FONT]
    [FONT=&quot]Variable එක x (මේ සදහා ඔබ කැමති, ආස ඉංග්‍රිසි අකුරක් යොදා ගත හැක.) යැයි සිතමු.[/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot]දැන් අපි මෙ variable එක assign කරමු[/FONT]
    [FONT=&quot]එය කරන්නෙ පහත ලෙසය.[/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot]float x;[/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot]දෙගුනවී ලැබෙන අගය y යැයි ගතහොත්, එ සදහාද variable එකක් assign කලයුතුයි.[/FONT]
    [FONT=&quot]එවිට එය,[/FONT]
    [FONT=&quot]floaty;[/FONT][FONT=&quot] ආකාරයට වේ.[/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot]ඉහත variable assigns දෙකම එකතු කර පහත ලෙස ලිවිය හැක.[/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot]float x, y ;[/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot]මෙය සගල වරහනට පසුව අතුලත් කල යුතුයි.[/FONT][FONT=&quot][/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot]2. [/FONT][FONT=&quot]දැන් බලමු අපි මෙ අගය දෙගුන කර ගන්නෙ කෙසේද කියා.[/FONT][FONT=&quot][/FONT]
    [FONT=&quot]ඒ සදහා අපි යොදා ගන්න සන්කෙතම (+ - / * ) යොදා ගතහැක.[/FONT][FONT=&quot][/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot] දැන් program එක ලියන්න ඕන ඔක්කොම කරුනු ටික තියනවා.[/FONT]
    [FONT=&quot]එහෙනම්
    [/FONT]

    [FONT=&quot]මෙන්න අවසාන program එක.[/FONT][FONT=&quot][/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot]#include <iostream.h>[/FONT]
    [FONT=&quot]void main () [/FONT]
    [FONT=&quot] [/FONT]
    [FONT=&quot]{[/FONT]
    [FONT=&quot] Float x,y;[/FONT]
    [FONT=&quot] cout<< “ [/FONT][FONT=&quot]Please enter your no:[/FONT][FONT=&quot] ” ;[/FONT]
    [FONT=&quot] cin>> x;[/FONT]
    [FONT=&quot] y= x*2;[/FONT]
    [FONT=&quot] cout<< y;[/FONT]
    [FONT=&quot]}[/FONT]

    [FONT=&quot][/FONT]

    [FONT=&quot]අත් හදා බලල ගුන දොස් කියන්න.
    [/FONT]
     

    lilman

    Well-known member
  • May 10, 2009
    40,850
    54,307
    113
    Colombo
    thanks
    11.gif
     

    imscncl

    Well-known member
  • Jul 8, 2008
    1,447
    186
    63
    ලoකාවෙ
    Part 3

    [FONT=&quot]අද මම කියලා දෙනවා ඉතාම වැදගටත් එකක්[/FONT]
    [FONT=&quot]මේක if else statement එක.[/FONT] :love::love::love:

    [FONT=&quot]එකෙන් අපිට යමක් test කරන්න පුලුවන්.[/FONT]
    [FONT=&quot]ඒ කියන්නෙ අපි හිතමු අපිට ඕන යම් ඉලක්කමක අගය[/FONT]
    [FONT=&quot]10 අඩුද, වැඩිද, සමානද කියලා check කරන්න ඕන කියලා.[/FONT]
    [FONT=&quot]අන්න එකට මේක භාවිතා කරන්න පුලුවන්.[/FONT]

    [FONT=&quot]දැන් අපි බලමු if else statement එක භාවිතා කරන්නෙ කොහමද කියලා.[/FONT]

    [FONT=&quot]අපි හිතමු x කියල ඉලක්කමක අගය 10 අඩුද, වැඩිද, සමානද කියල බලන්න ඕන කියල.[/FONT]

    [FONT=&quot]1. [/FONT][FONT=&quot]10 අඩුද කියල බැලීම.[/FONT]
    [FONT=&quot]if (x<10)[/FONT]

    [FONT=&quot]2. [/FONT][FONT=&quot]10 වැඩිද කියල බැලීම.[/FONT]
    [FONT=&quot]If (x>10)[/FONT]

    [FONT=&quot][/FONT][FONT=&quot]3.10 සාමානද කියල බැලීම.[/FONT]
    [FONT=&quot]If (x==10)[/FONT]
    [FONT=&quot]සමානද කියල බලද්දි සමාන ලකුනු දෙකක් භාවිතා කරනවා.[/FONT]

    [FONT=&quot]අපි හිතමු ඉහත සියලු අව[/FONT][FONT=&quot]‍[/FONT][FONT=&quot]ස්‍‍තාවල අපි test කරන එක‍‍‍‍[/FONT][FONT=&quot] ඇත්ත නම් correct කියලද,[/FONT]
    [FONT=&quot]ටෙස්ට් කරන එක වැරදි නම් incorrect කියලද පෙන්වීමට ඕන කියලා එවිට පහත ලෙස එය ලිවිය හැක.[/FONT]
    [FONT=&quot]
    [/FONT]

    [FONT=&quot]
    [/FONT]

    [FONT=&quot]1. 10 අඩුදකියලාබැලීමට.[/FONT]
    [FONT=&quot]if (x<10)[/FONT]
    [FONT=&quot]cout<<” correct ”;[/FONT]

    [FONT=&quot]else[/FONT]
    [FONT=&quot]cout<<” incorrect ”;[/FONT]


    [FONT=&quot]2.1 0 වැඩිද කියල බැලීමට.[/FONT]
    [FONT=&quot]If (x>10)[/FONT]
    [FONT=&quot]cout<<” correct ”;[/FONT]

    [FONT=&quot]else[/FONT]
    [FONT=&quot]cout<<” incorrect ”;[/FONT]




    [FONT=&quot]3. 10 සාමානද කියල බැලීමට.[/FONT]
    [FONT=&quot]If (x==10)[/FONT]
    [FONT=&quot]cout<<” correct ”;[/FONT]

    [FONT=&quot]else[/FONT]
    [FONT=&quot]cout<<” incorrect ”;[/FONT]


    [FONT=&quot]ok එහෙනම් අපි අද ඉගෙන ගත්ත දෙය භාවිතා කරලා Program එකක් ලියමු.[/FONT]
    [FONT=&quot]මේක passward එකක් ලබාදී එක හරි නම් හරි කීයලත් වැරදි නම් වැරදියි කියලා පෙන්වන එකක්.[/FONT]

    [FONT=&quot]/* ******************************** [/FONT]
    [FONT=&quot]Author : W.T.D. Dasanayake[/FONT]
    [FONT=&quot] Date : 2011 11 18[/FONT]
    [FONT=&quot] Email :[email protected][/FONT]
    [FONT=&quot] Blog :Wtddsoft.blogspot.com[/FONT]
    [FONT=&quot] ******************************** */[/FONT]

    [FONT=&quot]#include <iostream.h>[/FONT]
    [FONT=&quot]void main () [/FONT]

    [FONT=&quot]{[/FONT]
    [FONT=&quot] float x;[/FONT]
    [FONT=&quot]cout<< "Please Enter your Passward: ";[/FONT]
    [FONT=&quot]cin>>x;[/FONT]
    [FONT=&quot]if (x==1234)[/FONT]
    [FONT=&quot]cout<<" Passward is correct \n";[/FONT]
    [FONT=&quot]else[/FONT]
    [FONT=&quot]cout<<"Passward is Incorrect \n";[/FONT]
    [FONT=&quot]}[/FONT]
    [FONT=&quot]මෙහි passward එක 1234 වේ.[/FONT]

    [FONT=&quot]මේක භාවිතයක් ලෙස ගැනීමෙදී මෙලෙස යොදා ගත හැක.[/FONT]
    [FONT=&quot]මේ සදහා අපි කලින් ලි‍යූ ඉලක්කමක් දෙගුන කිරීම යොදාගන්නවා.[/FONT]

    [FONT=&quot]/* ******************************** [/FONT]
    [FONT=&quot]Author : W.T.D. Dasanayake[/FONT]
    [FONT=&quot] Date : 2011 11 18[/FONT]
    [FONT=&quot] Email :[email protected][/FONT]
    [FONT=&quot] Blog :Wtddsoft.blogspot.com[/FONT]
    [FONT=&quot] ******************************** */[/FONT]

    [FONT=&quot]#include <iostream.h>[/FONT]
    [FONT=&quot]void main (void) [/FONT]

    [FONT=&quot]{[/FONT]
    [FONT=&quot] float p,x,y;[/FONT]
    [FONT=&quot] cout<< "Please Enter your Passward: ";[/FONT]
    [FONT=&quot] cin>>p;[/FONT]
    [FONT=&quot] if (p==1234)[/FONT]
    [FONT=&quot] {[/FONT]
    [FONT=&quot] cout<< " Please enter your no: " ;[/FONT]
    [FONT=&quot] cin>> x;[/FONT]
    [FONT=&quot] y= x*2;[/FONT]
    [FONT=&quot] cout<< y<<"\n";[/FONT]
    [FONT=&quot] }[/FONT]
    [FONT=&quot] else[/FONT]
    [FONT=&quot] cout<<" Passward is Incorrect \n";[/FONT]

    [FONT=&quot]}[/FONT]

    [FONT=&quot]මෙහිදී Passward එක හරි නම් අපිට ඉලක්කමක් අතුලු කිරිමට අවස්තාව ලැබෙන අතර,[/FONT]
    [FONT=&quot]Passward එක වැරදිනම් ඉවත්වීමට සිදුවේ.[/FONT] :P:P:P


    [FONT=&quot]හරි දැන් එහෙනම් මම දෙන්නම් ඔයාලට ලියන්න Program එකක් දෙන්නම්.[/FONT] :rofl::rofl::rofl:
    [FONT=&quot]ඒකෙන් මේකයි වෙන්න ඕන.[/FONT]

    [FONT=&quot]Exam එකේ subject වල ලකුනු ඇතුලත් කරාම Result එක A,B,C,F ද කියලා ලැබෙන්න ඕන.[/FONT]

    [FONT=&quot]A දෙන්නෙ 80 වැඩි නම්,[/FONT]
    [FONT=&quot]B දෙන්නෙ 60 වැඩි නම්,[/FONT]
    [FONT=&quot]C දෙන්නෙ 40 වැඩි නම්,[/FONT]
    [FONT=&quot]F දෙන්නෙ 41 අඩු නම්,[/FONT]

    [FONT=&quot]පුලුවන් අය ලියන්න බලන්න.[/FONT] :):):)
    මතු සම්බන්දයි
     
    • Like
    Reactions: Mal Baba

    rotiya

    Member
    Feb 18, 2008
    15,188
    107
    0
    ~> R0CKC!TY KURUN3G4L4 <~
    [FONT=&quot]අද මම කියලා දෙනවා ඉතාම වැදගටත් එකක්[/FONT]
    [FONT=&quot]මේක if else statement එක.[/FONT] :love::love::love:

    [FONT=&quot]එකෙන් අපිට යමක් test කරන්න පුලුවන්.[/FONT]
    [FONT=&quot]ඒ කියන්නෙ අපි හිතමු අපිට ඕන යම් ඉලක්කමක අගය[/FONT]
    [FONT=&quot]10 අඩුද, වැඩිද, සමානද කියලා check කරන්න ඕන කියලා.[/FONT]
    [FONT=&quot]අන්න එකට මේක භාවිතා කරන්න පුලුවන්.[/FONT]

    [FONT=&quot]දැන් අපි බලමු if else statement එක භාවිතා කරන්නෙ කොහමද කියලා.[/FONT]

    [FONT=&quot]අපි හිතමු x කියල ඉලක්කමක අගය 10 අඩුද, වැඩිද, සමානද කියල බලන්න ඕන කියල.[/FONT]

    [FONT=&quot]1. [/FONT][FONT=&quot]10 අඩුද කියල බැලීම.[/FONT]
    [FONT=&quot]if (x<10)[/FONT]

    [FONT=&quot]2. [/FONT][FONT=&quot]10 වැඩිද කියල බැලීම.[/FONT]
    [FONT=&quot]If (x>10)[/FONT]

    [FONT=&quot][/FONT][FONT=&quot]3.10 සාමානද කියල බැලීම.[/FONT]
    [FONT=&quot]If (x==10)[/FONT]
    [FONT=&quot]සමානද කියල බලද්දි සමාන ලකුනු දෙකක් භාවිතා කරනවා.[/FONT]

    [FONT=&quot]අපි හිතමු ඉහත සියලු අව[/FONT][FONT=&quot]‍[/FONT][FONT=&quot]ස්‍‍තාවල අපි test කරන එක‍‍‍‍[/FONT][FONT=&quot] ඇත්ත නම් correct කියලද,[/FONT]
    [FONT=&quot]ටෙස්ට් කරන එක වැරදි නම් incorrect කියලද පෙන්වීමට ඕන කියලා එවිට පහත ලෙස එය ලිවිය හැක.[/FONT]
    [FONT=&quot]
    [/FONT]

    [FONT=&quot]
    [/FONT]

    [FONT=&quot]1. 10 අඩුදකියලාබැලීමට.[/FONT]
    [FONT=&quot]if (x<10)[/FONT]
    [FONT=&quot]cout<<” correct ”;[/FONT]

    [FONT=&quot]else[/FONT]
    [FONT=&quot]cout<<” incorrect ”;[/FONT]


    [FONT=&quot]2.1 0 වැඩිද කියල බැලීමට.[/FONT]
    [FONT=&quot]If (x>10)[/FONT]
    [FONT=&quot]cout<<” correct ”;[/FONT]

    [FONT=&quot]else[/FONT]
    [FONT=&quot]cout<<” incorrect ”;[/FONT]




    [FONT=&quot]3. 10 සාමානද කියල බැලීමට.[/FONT]
    [FONT=&quot]If (x==10)[/FONT]
    [FONT=&quot]cout<<” correct ”;[/FONT]

    [FONT=&quot]else[/FONT]
    [FONT=&quot]cout<<” incorrect ”;[/FONT]


    [FONT=&quot]ok එහෙනම් අපි අද ඉගෙන ගත්ත දෙය භාවිතා කරලා Program එකක් ලියමු.[/FONT]
    [FONT=&quot]මේක passward එකක් ලබාදී එක හරි නම් හරි කීයලත් වැරදි නම් වැරදියි කියලා පෙන්වන එකක්.[/FONT]

    [FONT=&quot]/* ******************************** [/FONT]
    [FONT=&quot]Author : W.T.D. Dasanayake[/FONT]
    [FONT=&quot] Date : 2011 11 18[/FONT]
    [FONT=&quot] Email :[email protected][/FONT]
    [FONT=&quot] Blog :Wtddsoft.blogspot.com[/FONT]
    [FONT=&quot] ******************************** */[/FONT]

    [FONT=&quot]#include <iostream.h>[/FONT]
    [FONT=&quot]void main () [/FONT]

    [FONT=&quot]{[/FONT]
    [FONT=&quot] float x;[/FONT]
    [FONT=&quot]cout<< "Please Enter your Passward: ";[/FONT]
    [FONT=&quot]cin>>x;[/FONT]
    [FONT=&quot]if (x==1234)[/FONT]
    [FONT=&quot]cout<<" Passward is correct \n";[/FONT]
    [FONT=&quot]else[/FONT]
    [FONT=&quot]cout<<"Passward is Incorrect \n";[/FONT]
    [FONT=&quot]}[/FONT]
    [FONT=&quot]මෙහි passward එක 1234 වේ.[/FONT]

    [FONT=&quot]මේක භාවිතයක් ලෙස ගැනීමෙදී මෙලෙස යොදා ගත හැක.[/FONT]
    [FONT=&quot]මේ සදහා අපි කලින් ලි‍යූ ඉලක්කමක් දෙගුන කිරීම යොදාගන්නවා.[/FONT]

    [FONT=&quot]/* ******************************** [/FONT]
    [FONT=&quot]Author : W.T.D. Dasanayake[/FONT]
    [FONT=&quot] Date : 2011 11 18[/FONT]
    [FONT=&quot] Email :[email protected][/FONT]
    [FONT=&quot] Blog :Wtddsoft.blogspot.com[/FONT]
    [FONT=&quot] ******************************** */[/FONT]

    [FONT=&quot]#include <iostream.h>[/FONT]
    [FONT=&quot]void main (void) [/FONT]

    [FONT=&quot]{[/FONT]
    [FONT=&quot] float p,x,y;[/FONT]
    [FONT=&quot] cout<< "Please Enter your Passward: ";[/FONT]
    [FONT=&quot] cin>>p;[/FONT]
    [FONT=&quot] if (p==1234)[/FONT]
    [FONT=&quot] {[/FONT]
    [FONT=&quot] cout<< " Please enter your no: " ;[/FONT]
    [FONT=&quot] cin>> x;[/FONT]
    [FONT=&quot] y= x*2;[/FONT]
    [FONT=&quot] cout<< y<<"\n";[/FONT]
    [FONT=&quot] }[/FONT]
    [FONT=&quot] else[/FONT]
    [FONT=&quot] cout<<" Passward is Incorrect \n";[/FONT]

    [FONT=&quot]}[/FONT]

    [FONT=&quot]මෙහිදී Passward එක හරි නම් අපිට ඉලක්කමක් අතුලු කිරිමට අවස්තාව ලැබෙන අතර,[/FONT]
    [FONT=&quot]Passward එක වැරදිනම් ඉවත්වීමට සිදුවේ.[/FONT] :P:P:P


    [FONT=&quot]හරි දැන් එහෙනම් මම දෙන්නම් ඔයාලට ලියන්න Program එකක් දෙන්නම්.[/FONT] :rofl::rofl::rofl:
    [FONT=&quot]ඒකෙන් මේකයි වෙන්න ඕන.[/FONT]

    [FONT=&quot]Exam එකේ subject වල ලකුනු ඇතුලත් කරාම Result එක A,B,C,F ද කියලා ලැබෙන්න ඕන.[/FONT]

    [FONT=&quot]A දෙන්නෙ 80 වැඩි නම්,[/FONT]
    [FONT=&quot]B දෙන්නෙ 60 වැඩි නම්,[/FONT]
    [FONT=&quot]C දෙන්නෙ 40 වැඩි නම්,[/FONT]
    [FONT=&quot]F දෙන්නෙ 41 අඩු නම්,[/FONT]

    [FONT=&quot]පුලුවන් අය ලියන්න බලන්න.[/FONT] :):):)
    මතු සම්බන්දයි
    meka thama api skole O/L it wala mulinma VB walata kare :D:D
    hehe
     

    imscncl

    Well-known member
  • Jul 8, 2008
    1,447
    186
    63
    ලoකාවෙ

    m.shabri

    Member
    Aug 21, 2008
    277
    10
    0
    Colombo
    meka harida blapn

    #include<iosream.h>
    void main()


    {

    float english,math,kool,lol;
    cout<<"Enter ur subject marks:";

    if(english>80)
    cout<<"A";

    if(math>60)
    cout<<"B";

    if(kool>40)
    cout<<"C";

    if (lol<47)
    cout<<"f";


    }
     

    imscncl

    Well-known member
  • Jul 8, 2008
    1,447
    186
    63
    ලoකාවෙ
    #include<iosream.h>
    void main()


    {

    float english,math,kool,lol;
    cout<<"Enter ur subject marks:";

    if(english>80)
    cout<<"A";

    if(math>60)
    cout<<"B";

    if(kool>40)
    cout<<"C";

    if (lol<47)
    cout<<"f";


    }


    මචං පොඩි අඩු පාඩු ටිකක් තියනවා. මට හිතා ගන්න බැහැ මෙ ටික (english,math,kool,lol)
    ගත්තෙ මොකටද කියලා.
    අනික මෙකෙ අපි අතුලත් කරපු ලකුනු program එකට අතුලත් (save) කරගෙන නැහැ. cin එක use කරන්න ඕන.
    අනික ඔය else එක භාවිතා කරලා නැහැ

    වෙන කාටවත් මෙහෙම එකක්වත් බැරිද?