anonymous No title
C
#include <stdio.h>
#include <stdlib.h>
#include<string.h>

 struct CELL{
    struct CELL *prev;
    int value;
    struct CELL *next;
};
struct CELL *insertCellPrev(struct CELL*, int);

struct CELL head;

struct CELL *appendCell(int data){
    struct CELL *p;
    int x=data;
    p=insertCellPrev(&head , x);
    return p;
}
struct CELL *insertCellPrev(struct CELL *p , int data){
    struct CELL *x;
    if(p==NULL){
        printf("insert : 引数が正しくありません\n");
        return NULL;
    }
    x=(struct CELL*)malloc(sizeof(struct CELL));
    if(x==NULL){
        printf("not enough memory\n");
        return NULL;
    }
    x->value=data;
    x->next=p;
    x->prev=p->prev;
    p->prev->next=x;
    p->prev=x;
    return x;
}

void printDlist(struct CELL *q){
    struct CELL *p;
    printf("LIST[");
    for(p=q; p!=&head ; p=p->next){
        printf(" %d ", p->value);
    }
    printf("]\n");

}
int deleteDuplicatedCell(int data){
    struct CELL *p;
    int num=0;
    for(p=head.next ; p!=&head ; p=p->next){
        if(p->value==data){
            num++;
            p->prev->next=p->next;
            p->next->prev=p->prev;
            free(p);
        }
    }
    if(num==0){
        return -1;
    }else{
        return num;
    }
}
void freeDlist(){
    struct CELL *p;
    int x=0;
    p=&head;
    for(p=head.next ; p->prev=&head ; p=p->next){
        printDlist(p);
        p->prev->next=p->next;
        p->next->prev=p->prev;
        free(p);
    }
}
void main(int argc , char *argv[]){
    struct CELL *p;
    int num;
    int n;
    head.prev = head.next = &head;

    for(int i=1 ; i<argc ; i++){
       p=appendCell(atoi(argv[i]));
    }
    printDlist(head.next);

while(1){
    printf("Delete Data : "); scanf("%d", &num);
    if(num<0){
        printf("free list\n");
        freeDlist();
        exit(0);
    }
    n=deleteDuplicatedCell(num);
    if(n!=-1){
        printf("Deleted : %d\n", n);
    }else if(n==-1){
        printf("Not deleted .....\n");
    }
    printDlist(head.next);
}

    return ;
}
anonymous No title
C
#include <stdio.h>

int main(void)
{
    printf("Hello World!");
    return 0;
}
anonymous No title
C
#include〈stdio.h〉
 int main(void)
 {
   int n;
      while(true){
         printf(“%d¥n”,n);
n = n + 1;
      }
     return 0;
  }
anonymous No title
C
#include〈stdio.h〉
 int main(void)
 {
   int n;
     for(n=0;n<10;n++){
         printf(“%d¥n”,n);
      }
     return 0;
  }
anonymous No title
C
#include〈stdio.h〉
int main(void)
{ 
  int x;
   printf("整数を入力して下さい");
   scanf("%d",&x);
  if (x % 2)
       puts("2で割り切れません");
  else 
       puts("2で割り切れます");
    return 0;
}
anonymous No title
C
#include〈stdio.h〉
int main(void)
{ 
  int x;
   printf("整数を入力して下さい");
   scanf("%d",&x);
  if (x%2)
       puts("2で割り切れません");
  else 
       puts("2で割り切れます");
    return 0;
}
anonymous No title
C
#include〈stdio.h〉
int main(void)
{
   printf("はじめまして。¥n”);
  return 0;
}
anonymous arduino nano every で簡単なプログラム
C
const int LED_PIN = 13;         /* LED DIO                     */
const int RIG_BAND_PIN = A0;    /* BAND pin 入力               */

void setup()
{
    Serial.begin(115200);
    pinMode( LED_PIN, OUTPUT);
}

void loop()
{
    int   voltage_lsb;
    float voltage;

    voltage_lsb = analogRead( RIG_BAND_PIN);
    voltage = voltage_lsb / 1023.0;
    
    Serial.print( "LSB:");
    Serial.print( voltage_lsb);
    Serial.print( " Voltage:");
    Serial.println( voltage);
    if( voltage_lsb > 512){
        digitalWrite( LED_PIN, HIGH);
    }else{
        digitalWrite( LED_PIN, LOW);
    }
    delay(1000);
}
anonymous No title
C
#include <stdio.h>

int sum(int max, int min)
{
    int num;
    num = (max + min) * (max - min + 1) / 2;
    return num;
}

int main()
{
    int value,ma,mi;
    scanf("%d%d",&ma,&mi);
    value = sum(ma,mi) * 0.5;
    printf("%d\n", value);
    return 0;
}
anonymous No title
C
#include "hiker.h"

int answer(void)
{
    return 42;
}
Don't you submit code?
Submit