Demo entry 1774360

inverse1

   

Submitted by anonymous on Jun 01, 2015 at 04:19
Language: C. Code size: 300 Bytes.

/* プログラム例 */
#include <stdio.h>
int main(void) {
    int m;
    double n;
    puts("0でない整数を入力してください.");
    printf("整数m:");
    scanf("%d", &m);
    n = gyakusuu(m); 
    printf("mの逆数は%dです.\n", n);
    return 0;
}
double gyakusuu(int x) {
    double y;
    y = 1 / x;
    return(y);
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).