[ create a new paste ] login | about

Link: http://codepad.org/r6Ls3ulX    [ raw code | output | fork | 1 comment ]

C, pasted on Sep 6:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include<stdio.h>
#include<conio.h>

int main()
{
	int i = 1;
	while(i < 100)
	{
		printf("%5d", i);
		i = i + 2;
	}
	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 yonnon on Jul 12
#include<bits/stdc++.h>

using namespace std;
int main(){
int n;
cout << "Enter your sentence: ";
cin >> n;
cout<<"Value ";
for( int i=0 ; i <= n; ++i){
if(i%2 != 0){
cout<<" "<<i;

}
}
return 0;
}
reply