NOSSO MENU

sexta-feira, 25 de dezembro de 2020

Calculadora simples em JavaSscript

 <!DOCTYPE html>

<html>

<h1>NOSSO APLICATIVO CALCULADORA!</h1>

<head>

<h3>NOSSO PRIMEIRO APP</h3>

<style>

h1 {

  color: red;

  text-align: center;

}

h3 {

  color: blue;

  text-align: center;

}

</style>

<script>

/* mostra resultados na tela 

alert(x);

alert("ola"); //popup

document.write(y); //mostra na tela/ escreve no html

document.write(sub(1,2)); // subtração

opcoes para mostrar na tela: 

Writing into an HTML element, using innerHTML.

Writing into the HTML output using document.write().

Writing into an alert box, using window.alert().

Writing into the browser console, using console.log().

*/

// classes POO

// escolhe a opção e os numeros para as operaçoes

// op =1, op =2, op = 3, op = 4. x=x e y = y


class calc {

constructor(x, y){

this.x = x;

this.y = y;

}

soma(){

return this.x + this.y;

}

sub(){

return this.x + this.y;

}

mult(){

return this.x + this.y;

}

div(){

return this.x + this.y;

}

}


// Usando SWITCH EM JavaScript

var text;

var opcao = prompt("Qual é a opcao(soma, sub, mult, div)");

//var opcao = document.write("Qual é a opcao: ");

switch(opcao) {

  case "soma":

    var x = parseInt(prompt("digite o numero X")); //parseInt converte para inteiro

var y = parseInt(prompt("digite o numero Y"));

    resultados = new calc(x,y);

    //document.write(soma);

    document.write(resultados.soma());

    break;

  case "sub":

    var x = parseInt(prompt("digite o numero X")); //parseInt converte para inteiro

var y = parseInt(prompt("digite o numero Y"));

    resultados = new calc(x,y);

    //document.write(soma);

    document.write(resultados.sub());

    break;

  case "mult":

    var x = parseInt(prompt("digite o numero X")); //parseInt converte para inteiro

var y = parseInt(prompt("digite o numero Y"));

    resultados = new calc(x,y);

    //document.write(soma);

    document.write(resultados.mult());

    break;

  case "div":

    var x = parseInt(prompt("digite o numero X")); //parseInt converte para inteiro

var y = parseInt(prompt("digite o numero Y"));

    resultados = new calc(x,y);

    //document.write(soma);

    document.write(resultados.div());

break;

  default:

    //text = "I have never heard of that one..";

}


// APLICACAO DA NOSSA CLASSE

//resultados = new calc(2,4);

//document.write(soma);

//document.write(resultados.soma());

//alert(resultados.soma); // alert mostra o resultado

</script>

</head>

</html>

Usando classe em JavaScript

 <!DOCTYPE html>

<html>

<h1> escripts js</h1>

<script>


// classes em javascript


class soma_sub {

constructor(x, y){

this.x = x;

this.y = y;

}

soma(){

return this.x + this.y;

}

}



// aplicando a classe


result = new soma_sub(5,7);

document.write(result.soma());


</script>

<body>

</body>

</html>

terça-feira, 22 de dezembro de 2020

As Linguagens de Programação Mais Usadas Atualmente Java, C, C++, Python, C#, JavaScript, Visual Basic .NET, R, PHP, MATLAB, Swift, Objective-C, Assembly, Perl, Ruby, Delphi , Object Pascal, Go, Scratch, PL/SQL, Visual Basic.

 

As Linguagens de Programação Mais Usadas Atualmente

Java,

 C,

 C++,

 Python, 

C#, 

JavaScript,

 Visual Basic .NET, 

R, 

PHP,

 MATLAB, 

Swift,

 Objective-C, 

Assembly, 

Perl,

 Ruby, 

Delphi ,

Object Pascal, 

Go, 

Scratch, 

PL/SQL,

Visual Basic.


linguagem programação estranha Whitespace Olá mundo ou Hello World!

 linguagem programação estranha

Whitespace

Olá mundo ou Hello World!
S S S T	S S T	S S S L
T	L
S S S S S T	T	S S T	S T	L
T	L
S S S S S T	T	S T	T	S S L
T	L
S S S S S T	T	S T	T	S S L
T	L
S S S S S T	T	S T	T	T	T	L
T	L
S S S S S T	S T	T	S S L
T	L
S S S S S T	S S S S S L
T	L
S S S S S T	T	T	S T	T	T	L
T	L
S S S S S T	T	S T	T	T	T	L
T	L
S S S S S T	T	T	S S T	S L
T	L
S S S S S T	T	S T	T	S S L
T	L
S S S S S T	T	S S T	S S L
T	L
S S S S S T	S S S S T	L
T	L
S S L
L
L

linguagem programação estranha Chicken Olá mundo! ou inglês (“Hello World”):

     linguagem programação estranha

Chicken

Olá mundo!  ou inglês (“Hello World”):
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

5 Whitespace

Olá mundo ou Hello World!
S S S T	S S T	S S S L
T	L
S S S S S T	T	S S T	S T	L
T	L
S S S S S T	T	S T	T	S S L
T	L
S S S S S T	T	S T	T	S S L
T	L
S S S S S T	T	S T	T	T	T	L
T	L
S S S S S T	S T	T	S S L
T	L
S S S S S T	S S S S S L
T	L
S S S S S T	T	T	S T	T	T	L
T	L
S S S S S T	T	S T	T	T	T	L
T	L
S S S S S T	T	T	S S T	S L
T	L
S S S S S T	T	S T	T	S S L
T	L
S S S S S T	T	S S T	S S L
T	L
S S S S S T	S S S S T	L
T	L
S S L
L
L

Redes Sociais

anuncios