#include
<conio.h>
#include
<iostream>
#include
<stdio>
main(){
int n=6,i,bil;
for(i=1;i<=n;i++)
{
bil=i*2-1;
printf("%d ",bil);
}
getch();
}
hslnya: 1 3 5 7 9 11
=======================================================
#include
<conio.h>
#include
<iostream>
#include
<stdio>
main(){
int n=6,i,bil;
for(i=1;i<=n;i++)
{
bil=(i*i)+1;
printf("%d ",bil);
}
getch();
}
===================================================
#include
<conio.h>
#include
<iostream>
#include
<stdio>
main(){
int b,n=8,i,bil;
for(i=1;i<=n;i++)
{
bil=i;
b=bil%2;
if(b==0)
{printf("%d ",bil);}
else
{printf("%d- ",bil);}
}
getch();
}
hslnya: 1-2 3-4 5-6 7-8