Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Compile and Execute C Online

c

#include <stdio.h>

int main()
{
    int i;
    for(i=1;i++;i<=5)
    printf("Hello, World!\n");

    return 0;
}

Compile and Execute C Online

c

import java.util.Scanner;
public class Fibonacci
{
    public static void main(String args[])
    {
        System.out.println("Enter a number:");
        Scanner Scan=new Scanner(System.in);
        int n=Integer.parseInt(s.nextInt());
        int a=-1;
        int b=1;
        int c=0;
        System.out.println("The fibonacci series are:");
        for(i=1;i<=n;i++)
        {
            c=a+b;
            int temp=a;
            a=b;
            b=c;
            System.out.println(c);
        }
    }
}

Compile and Execute C Online

c

#include <stdio.h>

int main()
{
    int x,y,z;
    printf("enter an integer ");
    scanf("%d", &x);
    printf("enter an integer ");
    scanf("%d", &y);
    z=x+y;
    printf("The sum is %d", z);
    
    return 0;
}

Intro to Embedded Lab_1

c

//Lab 1- Bryan Regn 
// Created 9/6/17 Last updated 9/9/17

//main 
#include <stdio.h>
#include <math.h>
//main file used to check user inputs and call different mathmatical operations
int main()
{

    return 0;
}

//math.c
//all the following functions require their specific Operator (+,-,*,/,%) and two integers to correctly call the function
//Adds two integers together prints back their sum
void add(num1, num2, Operator){
   int sum = 0; 
   sum = num1 + num2;
   printf(sum);
}
//subtracts two integers prints back the difference
void sub(num1, num2, Operator){
    int difference = 0;
    difference = num1 - num2;
    printf(difference);
}
//multiplies together two integers prints back product
void mul(num1, num2, Operator){
    int product = 0;
    product = num1*num2;
    printf(product);
}
//divides two integers prints back answer
void divide(num1, num2, Operator){
    int division - 0;
    division = num1/num2;
    printf(division);
}
//divides two integers prints back remainder of answer
void modulus(num1, num2, Operator){
    int result = 0; //remainder was a reserved word and didnt want to use that
    result = num1%num2;
    printf(result);
}
//Math.h
#ifndef MATH_H_
#define MATH_H_

//Part of your documentation should be listing the valid inputs and outputs for the functions you create.
int math(int num1, int num2, char Operator);

#endif

Compile and Execute C Online

c

#include <stdio.h>
void main() {
    printf("Hello World!\n");
}

a b c d e f g h i j k l m n o p q r s t u v w x y z

c

#include <stdio.h>

int main()
{
    printf("Hello, World!\n");

    return 0;
}

LinkedList12345678901234567890

c

#include <stdio.h>

int main()
{
    printf("Hello, World!\n");

    return 0;
}

int fn(int a, int b) { if (b == 0) return 0; if (b == 1) return a; return a + fn(a, b-1); }

c

int fn(int a, int b) {
	if (b == 0) return 0;
	if (b == 1) return a;
	return a + fn(a, b-1);
}

CHAT APP WHICH IS EASY AND BEAUTIFUL TO USE

c

#include<stdio.h>
#include<stdlib.h>

struct user
{
char name[20],age[2],email[50],pass[8];
}usr;

struct user1
{
char name[20],pass[8];
}usn;

void main
{
char user1[20],user2[20],message[1000];
char sign[1];
FILE *ptr;

printf("Do you want to Sign Up or Sign In?");
printf("Press Y for Sign Up and N for Sign In");
scanf("%s",&sign);


if(sign == Y)
{

    printf("Enter your user name:- ");
    scanf("%s",&usr.name);
    printf("Enter Your Age:- ");
    scanf("%s",&usr.age);
    printf("Enter your Email Address:- ");
    scanf("%s",&usr.email);
    printf("Enter your password(8 characters):- ");
    scanf("%s",&usr.pass);
    fopen("1.txt",w+);
    fprintf(fp,"usr.name",*ptr);
    fprintf(fp,"usr.age",*ptr);
    fprintf(fp,"usr.email",*ptr);
    fprintf(fp,"usr.pass",*ptr);
    fclose(*ptr);
}
else if(sign == N)
{

    printf("Enter your user name:- ");
    scanf("%s",&usn.name);
    printf("Enter your password:- ");
    scanf("%s",&usn.pass);
    fopen("1.txt",w+);
    fscanf(fp,"usr.name",*ptr);
    fscanf(fp,"usr.pass",*ptr);

}

if(*ptr == usn.name && usn.pass)
{
 printf("True!!!");
printf("You can proceed to chat room!!!");
goto ChAt1.cpp;
}
else if(*ptr != usn.name && usn.pass)
{
    printf("Wrong Password!!/nTry Again");
    goto main;
    }fclose(*ptr);
    else if(sign != Y && N)
{
    printf("Invalid Request!!!Please try Again!!!");
    goto main;
return 0;
}

Compile and Execute C Online

c

#include <stdio.h>
int main()
{
    int n;
    int m;
    int cntr;
    long long product;
    FILE*ark = fopen("Tablas de Multiplicar.dat","w");
    printf("¿Qué tabla de multiplicar desea conocer (Registre número)\n");
    scanf("&d", m);
    printf("¿Hasta qué número la desea calcular? (Registe número)\n");
    scanf("%d", &n);
    for (cntr = 1;  n=1; n++)
    {
        product= m*n;
        printf("%d %lld\n", cntr, product);
        fprintf(ark, "%d %lld\n", cntr, product);
    }
    return 0;
}

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.