Demo entry 2142789

fdg

   

Submitted by Kirill on Jul 09, 2015 at 11:33
Language: C. Code size: 534 Bytes.

// main.c

// Программа умножает целое число на N

#include <stdio.h>

#define N 3

int y2;  // Результат

int umn(int x)
{
    int y1;  // Результат

    y1 = N * x;
    
    y2 = y1;

    return y1;
}

int main(void)
{
    int number;  // Число
    int result;  // Результат

    printf("Input number: ");
    scanf("%d", &number);

    result = umn(number);

    printf("\nValue *%d: %d", N, result);
    printf("\nGlobal value *%d: %d", N, y2);

    getchar();
    getchar();

    return 0;
}

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).