[ create a new paste ] login | about

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

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

int main()
{
	int i, n;
	long S;
	S = 0;
	i = 1;
	printf("\nNhap n: ");
	scanf("%d", &n);

	while(i <= n)
	{
		S = S + i;
		i++;
	}
	printf("\nTong 1 + 2 + ... + %d la %ld: ", n, S);
	getch();
	return 0;
}


Output:
1
Line 17: error: conio.h: No such file or directory


Create a new paste based on this one


Comments:
posted by congphong on Mar 18
hfghjhjhjkh
reply
posted by thaitieuloi on May 7
reply
posted by duongthcsgiaothuy on Aug 18
ths
reply
posted by 141c910036 on Oct 10
reply
posted by trinhvathi on May 30

reply
posted by DacingGr3nade on Nov 24
thanks
reply
posted by thieuhuan18 on Mar 20
Nó báo lỗi Line 17: error: conio.h: No such file or directory làm sao sửa.
reply