Demo entry 1774473

inverse4

   

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

/* プログラム例 */
#include <stdio.h>

int main(void) {
    int m;
    double n;
    puts("0でない整数を入力してください.");
    printf("整数m:");
    scanf("%d", &m);
    n = gyakusuu(m); 
    printf("mの逆数は%.3fです.\n", n);
    return 0;
}
double gyakusuu(int x) {
    double y;
    y = 1.0 / x;
    return(y);
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).