Recent programs

Web application

an anonymous user · January 23, 2021 · NodeJS
class Car {
  constructor(name) {
    this.brand = name;
  }
}

mycar = new Car("Ford");

document.write(mycar.brand);

Programa 3

an anonymous user · January 23, 2021 · C
#include <stdio.h>

int main()
{
    int n1;
    int n2;
    int mult;
    printf( " Introduzca primer numero (entero): \n" );
    scanf( "%d", &n1 );
    printf( "Introduzca segundo numero (entero): \n" );
    scanf( "%d", &n2 );

separation_of_roots

an anonymous user · January 23, 2021 · Fortran
module my_mod
    external func
    interface SepOfRoot 
        subroutine separation_of_roots(a, b, n, func, k, periods)
            external func
            real:: a, b, func
            integer:: n, k
            real, dimension(:, :, :):: periods
        end subroutine separation_of_roots
    end interface SepOfRoot
end module my_mod

Programa 3

an anonymous user · January 23, 2021 · C
#include <stdio.h>

int main()
{
    int n1;
    int n2;
    int mult;
    printf( " Introduzca primer numero (entero): \n" );
    scanf( "%d", &n1 );
    printf( "Introduzca segundo numero (entero): \n" );
    scanf( "%d", &n2 );

Factorial 2

an anonymous user · January 23, 2021 · R
# recursion
factt<-function(n)
{
  if(n<=1)
  {
    return(1)
  }
  else
  {
    return(n*factt(n-1))#recursion
  }

Programa 3

an anonymous user · January 23, 2021 · C
#include <stdio.h>
Int main()
{
 int n1;
 int n2;
 int mult;
 printf( “ Introduzca primer numero (entero): \n” );
 scanf( “%d”, &n1 );
 printf( “Introduzca segundo numero (entero): \n” );
 scanf( “%d”, &n2 );
 mult = n1 * n2;

Factorial 1

an anonymous user · January 23, 2021 · R
5
factorial(5)
# code 
n=5
f=1 
for(i in 1:n)
{
  f=f*i
  print(f)
}
# use cat to use variable inside print

Positive or negative

Kaveri · January 23, 2021 · C
#include<stdio.h>
void main()
{
   int a; the
   printf("\n Enter a Number : ");
   scanf("%d",&a);
   printf("%d",a);
   if(a>0)
   {
      printf("\n  %d is a Positive Number \n",a);   
   }

Random number

an anonymous user · January 23, 2021 · R
#generating random number
runif(1)
runif(3)
runif(3, min=5, max=10)   
#implementing in distribution
rnorm(1)
rnorm(3)    
rnorm(3, mean=10, sd=2)    
#Generate random numbers in probabilty distributions
#uniform
n=10

data.db

an anonymous user · January 23, 2021 · SQL
CREATE TABLE messages (ID INTEGER PRIMARY KEY AUTOINCREMENT, content TEXT, date integer); 

Sum of digits

muneeswaran · January 23, 2021 · C
#include <stdio.h>
void main() 
{
    int i,sum=0,n;
    printf("\n Enter the value of N : ");
    scanf("%d",&n);
    printf("%d",n);
    for(i=1;i<=n;i++)
    {
        sum=sum+i;
        i=i++;

Programa 2

an anonymous user · January 23, 2021 · C
#include <stdio.h>

 int main ( ) {
printf( "1 2 3 4\n*") 
printf(" 1  ");
 printf( " 2  " );
printf( " 3  " );
printf( "4  \n")
 return  0;
}

largest of three values

an anonymous user · January 23, 2021 · C
#include <stdio.h>
int main()
{
    int a, b, c;
    printf("Enter two values");
    scanf("%d %d %d", &a,&b,&c);
    printf("\n %d,%d,%d", a, b,c);
    if(a==b && b==c)
    {
        printf("\n all values are same");
    }

Programa 2

an anonymous user · January 23, 2021 · C
#include <stdio.h>

Int main() {
Printf(“ 1 2 3 4 \n”);
Printf(“1\n”);
Printf(“2\n”);
Printf(“3\n”);
Printf(“4\n”);
 return 0;
}

Programa 2

an anonymous user · January 23, 2021 · C
#include <stdio.h>

Int ;main() {
Printf(“ 1 2 3 4 \n”);
Printf(“1\n”);
Printf(“2\n”);
Printf(“3\n”);
Printf(“4\n”);
 return 0;
}

C#18-61

an anonymous user · January 23, 2021 · C#
using System;
//JUAN PABLO 
namespace MyCompiler {
    class Program {
        public static void Main(string[] args) {
            string nom = "";
            int Num_Color;
            Num_Color = 5;
            
            
            Console.WriteLine("Programa en el que se escribe un NÚMERO ENTRE EL 1 Y EL 8 y regresara UN DIFERENTE COLOR");

Programa 4

an anonymous user · January 23, 2021 · C
#include <stdio.h>

int main()
{
    int numero;

    printf( "\n   Introduzca un número entero: " );
    scanf( "%d", &numero );

    if ( numero % 2 == 0 )
        printf( "\n   ES PAR" );

newton_optimization

an anonymous user · January 23, 2021 · Fortran
program main
    external func, dfdx, d2fdx2, d3fdx3
    real a, b, func, dfdx, d2fdx2, d3fdx3, e, x_min, y_min
    print'(a)', "Введите интервал неопределенности [a, b], &
    & на котором рассматривается функция:"
    print'(a, $)', "["
    read*, a
    print'(f5.1, $)', a
    print'(a, $)', ","
    read*, b
    print'(f4.1, $)', b

Programa 3

an anonymous user · January 23, 2021 · C
#include <stdio.h>

int main()
{
    int numero;

    printf( "\n   Introduzca un número entero: " );
    scanf( "%d", &numero );

    if ( numero % 2 == 0 )
        printf( "\n   ES PAR" );

Programa2

an anonymous user · January 23, 2021 · C
#include <stdio.h>

Int; main() {
Printf(“ 1 2 3 4 \n”);
Printf(“1\n”);
Printf(“2\n”);
Printf(“3\n”);
Printf(“4\n”);
 return 0;
}