[ create a new paste ] login | about

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

C, pasted on Aug 17:
1
2
3
4
5
6
7
8
9
10
#include<stdio.h>
#include<conio.h>
void main()
{
int n,i,sum=0;
printf("Enter\n");
scanf("%d", &n);
for(i=1; i<=n; i++){ sum=sum+i }
getch();
}


Output:
1
2
3
4
Line 17: error: conio.h: No such file or directory
In function 'main':
Line 8: error: expected ';' before '}' token
Line 4: warning: return type of 'main' is not 'int'


Create a new paste based on this one


Comments: