Author Topic: Looking for an example porgram that asks for user input ?  (Read 635 times)

sunshine33

  • Regular Member
  • *
  • Posts: 38
  • MASM32
Looking for an example porgram that asks for user input ?
« on: April 15, 2018, 05:20:31 PM »
Then displays the output ,

For example addition of two numbers and its result

declare integer line firstNumber, secondNumber, sumOfTwoNumbers;
scanf("%d %d", &firstNumber, &secondNumber); // scanf() function is used to read character from keyboard
printf("Enter two integers: "); // printf() function is used to print the “character ” onto the output screen.

jj2007

  • Member
  • *****
  • Posts: 8896
  • Assembler is fun ;-)
    • MasmBasic
Re: Looking for an example porgram that asks for user input ?
« Reply #1 on: April 15, 2018, 06:33:34 PM »
Try these.
Code: [Select]
msort.asm            C:\Masm32\examples\advanced\msort                  11 kB  3.9.04 08:00    31.10.14 00:13  File ASM   
scancode.asm        C:\Masm32\examples\advanced\scancode                13 kB  25.9.05 07:50    31.10.14 00:13  File ASM   
uwords.asm          C:\Masm32\examples\advanced\uwords                  14 kB  15.9.05 06:38    31.10.14 00:13  File ASM   
wrep.asm            C:\Masm32\examples\advanced\wrep                    21 kB  2.10.11 05:25    31.10.14 00:13  File ASM   
pbddemo.asm          C:\Masm32\examples\dialogs\pbddemo                  7 kB    27.4.08 14:12    31.10.14 00:13  File ASM   
gettext.asm          C:\Masm32\examples\dialogs\pbddemo\lib              5 kB    1.1.03 16:40    31.10.14 00:13  File ASM   
filtinpt.asm        C:\Masm32\examples\exampl01\filtinpt                11 kB  29.9.11 03:14    31.10.14 00:13  File ASM   
genericGdiPlus.asm  C:\Masm32\examples\exampl01\generic                16 kB  7.1.16 22:14    6.1.16 23:41    File ASM   
genericRgb.asm      C:\Masm32\examples\exampl01\generic                16 kB  8.1.16 02:38    8.1.16 02:38    File ASM   
31337.asm            C:\Masm32\examples\exampl01\leeto\31337            3 kB    16.11.99 15:42  31.10.14 00:13  File ASM   
regkey2.asm          C:\Masm32\examples\exampl02\regkey2                7 kB    15.2.00 08:56    31.10.14 00:13  File ASM   
textio.asm          C:\Masm32\examples\exampl02\textio                  3 kB    12.9.05 15:58    31.10.14 00:13  File ASM   
listview.asm        C:\Masm32\examples\exampl04\listview                35 kB  26.9.11 09:20    31.10.14 00:13  File ASM   
stripcc.asm          C:\Masm32\examples\exampl05\console\stripcc        8 kB    5.11.05 21:26    31.10.14 00:13  File ASM   
dosstyle.asm        C:\Masm32\examples\exampl05\hlldemo\dosstyle        3 kB    12.9.05 15:25    31.10.14 00:13  File ASM   
fileio.asm          C:\Masm32\examples\exampl05\hlldemo\fileio          5 kB    12.9.05 15:25    31.10.14 00:13  File ASM   
line_tokenize.asm    C:\Masm32\examples\exampl05\line_tokenize          6 kB    21.12.10 23:25  31.10.14 00:13  File ASM   
charcnt.asm          C:\Masm32\examples\exampl06\charcnt                3 kB    12.9.11 13:16    31.10.14 00:13  File ASM   
filter.asm          C:\Masm32\examples\exampl06\emfilter                5 kB    6.1.07 04:34    31.10.14 00:13  File ASM   
getini.asm          C:\Masm32\examples\exampl06\getini                  7 kB    1.9.04 05:25    31.10.14 00:13  File ASM   
vtable.asm          C:\Masm32\examples\exampl06\vtable                  8 kB    27.12.04 09:35  31.10.14 00:13  File ASM   
vtdll.asm            C:\Masm32\examples\exampl06\vtable                  5 kB    27.12.04 09:31  31.10.14 00:13  File ASM   
dynamic.asm          C:\Masm32\examples\exampl06\vtable\dynamic          8 kB    28.12.04 15:24  31.10.14 00:13  File ASM   
sa.asm              C:\Masm32\examples\exampl07\shuflarr                6 kB    11.6.07 06:45    31.10.14 00:13  File ASM   
tokenise.asm        C:\Masm32\examples\exampl07\tokenise                3 kB    6.12.05 05:10    31.10.14 00:13  File ASM   
ODBCTest.asm        C:\Masm32\examples\IczelionSQL                      10 kB  22.5.00 14:37    19.11.15 03:37  File ASM   
fda2.asm            C:\Masm32\examples\poasm\fda2                      21 kB  4.8.07 16:00    31.10.14 00:13  File ASM   
textio.asm          C:\Masm32\examples\unicode_generic\console\textio  2 kB    18.10.11 15:34  31.10.14 00:13  File ASM   
diskfile.asm        C:\Masm32\examples\unicode_generic\diskfile        2 kB    18.10.11 14:51  31.10.14 00:13  File ASM   

sunshine33

  • Regular Member
  • *
  • Posts: 38
  • MASM32
Re: Looking for an example porgram that asks for user input ?
« Reply #2 on: April 15, 2018, 07:04:15 PM »
Thanks a lot jj2007

That is a nicely sorted awesome list  :biggrin:
declare integer line firstNumber, secondNumber, sumOfTwoNumbers;
scanf("%d %d", &firstNumber, &secondNumber); // scanf() function is used to read character from keyboard
printf("Enter two integers: "); // printf() function is used to print the “character ” onto the output screen.

jj2007

  • Member
  • *****
  • Posts: 8896
  • Assembler is fun ;-)
    • MasmBasic
Re: Looking for an example porgram that asks for user input ?
« Reply #3 on: May 15, 2018, 09:38:33 PM »
You are welcome! We like well-programmed bots!