[ create a new paste ] login | about

Link: http://codepad.org/BQT0Bwns    [ raw code | output | fork | 2 comments ]

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

int main()
{
	int i;
	for(i = 1; i < 100; i+=2)
	{
		if((i == 5) || (i == 7) || (i == 93))
			continue;
		printf("%5d", i);
	}
	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=1; i<=n; ++i){
if(i%2 != 0){
if((i==5) || (i==7) || (i==93)){
continue;
}

cout<<" "<<i;
}
}
return 0;
}
reply
posted by cuong.luucb8921 on Sep 1
#include<stdio.h>

int main(){
int n;

do
{
printf("Nhap vap n:\n");
scanf("%d",&n);
if(n < 1)
{
printf("n phai lon hon bang 1\n");
}
}while(n < 1);

int i;

for(i=1;i<=n;i++)
{
if(i%2==1)
{
if(i==5 | i==7 | i==93)
{
continue;
}
printf("%d\n",i);
}
}
return 0;
}
reply