[ create a new paste ] login | about

Link: http://codepad.org/7CZwhrIC    [ raw code | output | fork ]

C, pasted on Aug 2:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//5-12
//20120802 10:59
#include <stdio.h>

#define NUMBER 5  /* ninzu */

int main(void)
{
int i;
int sum = 0;
int height[NUMBER] ;

puts("Input Height");
for ( i = 0; i < NUMBER; i++){
 height[i] = (150 + (double)49/i);
 printf("height[%d] = %d",i ,height[i]);
}
return (0);
}


Output:
1
2
Input Height
height[0] = -2147483648height[1] = 199height[2] = 174height[3] = 166height[4] = 162


Create a new paste based on this one


Comments: