Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <script type="text/javascript">
- function prikazi()
- { var broj=prompt("Unesite broj", "unesite broj");
- if (broj!=null && broj!="")
- {document.write((broj)*(broj)*(broj))}
- }
- </script>
- </head>
- <body>
- <input type="button" onclick="prikazi()" value="Click you fool!"/>
- </body>
- </head>
- </html>
- ============================================================================================================================
- <html>
- <head>
- <script type="text/javascript">
- function bla(a, b, c)
- {
- if (a<=0 || b<=0 || c<=0) return false;
- else
- {
- if ( ( (a>=b && a<=c) || (a<=b && a>=c) ) && (a*a*a == a*b*c) ) return true;
- if ( ( (b>=a && b<=c) || (b<=a && b>=c) ) && (b*b*b == a*b*c) ) return true;
- if ( ( (c>=a && c<=b) || (c<=a && c>=b) ) && (c*c*c == a*b*c) ) return true;
- return false;
- }
- }
- </script>
- </head>
- <body>
- <script type="text/javascript">
- document.write(bla(2,10,50));
- </script>
- </body>
- </html>
- ==========================================================================================================================================================
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main ()
- {
- ifstream test;
- string s;
- test.open("ulaz.txt");
- getline(test,s);
- test>>s;
- cout<<s<<endl;
- test.close();
- system ("Pause");
- return 0;
- }
- =====================================================================================================================
- #include <iostream>
- #include <fstream>
- #include <cstdlib>
- #include <string>
- using namespace std;
- int main()
- {
- fstream ulaz, izlaz;
- ulaz.open("ulaz1.txt");
- izlaz.open("izlaz1.txt");
- int i=0, a;
- while (ulaz.good())
- {
- ulaz>>a;
- izlaz<<a;
- i++;
- if (i == 4)
- {
- izlaz << "\n";
- i = 0;
- }
- }
- ulaz.close();
- izlaz.close();
- system("Pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement