Help for my program

Hello how can help me to create a program that input how many number do you want to display,odd,even and count the odd and even .using loop?

how many number do you want to display:8

the number 1:2
the number 3:4
the number 5:6
the number 7:8
the number 9:10
the number 11:12
the number 13:14
the number 15:16

the odd is:8
the even is:8

plssss can someone help me i will pass this tomorrow
Last edited on
so like, odd and even will always be the same with your program right?
yes
how can give me the codes for this program
Last edited on
transfer 200$ to my bankaccount and i'll send you the code
Hello can anyone help me plsss
Last edited on
sir plsss kayo lang yung pagasa ko maka pasa
sa programming
How about posting your code to start with?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include<stdio.h>
#include<conio.h>
main()
{
int i,k;
clrscr();
	printf("How many do you want to display:");
	scanf("%d",&i,k);
	for(i=2;i<=30;i+=2){
        for(k=1;k<=30;k+=2){
	
	printf("\nThe number %d:%d",i,&k);
	}
	}
getch();
}

here is my codes
Last edited on
You have a loop inside a loop. That means that, for a single value of i, you will loop over 30 values of k. Then for the next value of i, you loop another 30 times over the inner loop. I don't think that's what you want to do. Try thinking more clearly about the logic, before turning it into C++ code.
Topic archived. No new replies allowed.