+ 1
How to write this c++ program in JS
#include <iostream> using namespace std; int mani(){ int n,m,i cin>>n>>m; int a[n],b[m]; for (i=0;i<n;i++)cin>>a[i]; for (i=0;i<m;i++)cin>>b[i];
14 Respostas
+ 3
I find what was problem. I using qbasic and c++ 2 years ago and I forgot to input "="
+ 2
thanks Calvin. Great article on WebAssembly !!
+ 1
Simple. Learn JavaScript.
Easy.
+ 1
It's easy to run C++ program in JavaScript now by using WebAssembly.
Follow this easy tutorial to compile your C++ to JavaScript
https://medium.freecodecamp.org/get-started-with-webassembly-using-only-14-lines-of-javascript-b37b6aaca1e4
0
Cлaвeн Ђервида
You'll have to learn Javascript to do that
0
It is similar to this code as every language will have same fundamental ( variable , function , array , loops ).
There would be change in only syntax i.e variable would be declared with var keyword instead of int.
I would have given you code but believe me it wouldnt enhance your skill in js.
So try it , if you face any difficulty I would happy to help you☺️☺️.
0
I dont know how to input more that one varriable and decler a array
0
To declare multiple variable and array
var a=1,b=2,c=3;
var m=["hii" , "hello"];
Hope this helps☺️☺️.
0
input, but this is useful too
0
cin>>a>>b>>c; in JS
0
Using prompt.
I would highly recommend to learn Js first because it would be hard to understand at beginning.
0
Can you help me in code please
0
I can't declare array
0
Cлaвeн Ђервида
var array= [ ];
it's that easy