question04

Top  Previous  Next

Given 2 numbers, A and B, One needs to find their sum. The required output is one integer.

 

INPUT

OUTPUT

2

2

4

3

2

5

 

 

mytoggle_plus1See the solution:

var a := StrToIntDef(w3_Prompt('A+B''Enter 1st number'),0);

var b := StrToIntDef(w3_Prompt('A+B''Enter 2nd number'),0);

WriteLn('Sum is '+IntToStr(a+b));