first one is:
"Write a program that inputs one five-digit number, separates the number into its individual digit and prints the digits separated from one another by three spaces each.[Hint: Use combinations of integer division and the remainder operation.]"

my code is like this:

Code:
```#include <stdio.h>

int main()
{
int num;

printf("Enter a five-digit number:");
scanf("%d",&num);

printf("%d num/100000\n");
num=num%100000;
printf("%d num/10000\n");
num=num%10000;
printf("%d num/1000\n");
num=num%1000;
printf("%d num/100\n");
num=num%100;
printf("%d num/10\n");
num=num%10;

return 0;
}```

and here is the secound one, this one i could not do. by the way its my first yeat of C++.

"Given a set of coded information about a student, write a program that prints this information on a single line. For example,
A male student, at age 17, from Black Sea region, has fair performance with a GPA of 2.58"

Coded information is as follows:
Sex: 1:male, 2:female
Home region: 1:Marmara, 2: Agean, 3:Mediterrenian, 4:Central, :Black Sea, 6:Southeast, 7:East
Year of birth: 1988
GPA: 3-4: good, 2-2.99: fair, 1-1.99: poor, 0-0.99:failing

2. Well This should be in C forum not in c++...anyways here is the working code....though its printing in reverse order...make some changes yourself
Code:
```#include <stdio.h>

int main()
{
int num;

printf("Enter a five-digit number:");
scanf("%d",&num);

while(num>0)
{
printf("%4d",num%10);
num/=10;
}
return 0;
}```

3. Ok we have a C board and a C++ board please stick to the right ones please.

4. Originally Posted by sunnypalsingh
Well This should be in C forum not in c++...anyways here is the working code....though its printing in reverse order...make some changes yourself
Code:
```#include <stdio.h>

int main()
{
int num;

printf("Enter a five-digit number:");
scanf("%d",&num);

while(num>0)
{
printf("%4d",num%10);
num/=10;
}
return 0;
}```

i did like this:

Code:
```#include <stdio.h>

int main()
{
int num;

printf("Enter a five-digit number:");
scanf("%d", &num);

printf("%d", num/10000);
printf("   ");
num=num%10000;
printf("%d", num/1000);
printf("   ");
num=num%1000;
printf("%d", num/100);
printf("   ");
num=num%100;
printf("%d", num/10);
printf("   ");
num=num%10;
printf("%d", num/1);
printf("   \n");
num=num%1;

return 0;
}```
and it works well, thanks for your help also.

i begun like this

Code:
```#include <stdio.h>

int main()
{

int sex,male,female,homeregion,yearofbirth,gpa;

printf("Enter sex (1:male, 2:female:");
scanf("%d",sex);
if(sex==1)
printf("male\n");
if(sex==2)
printf("female\n");

printf("Enter home region (1:Marmara,2:Agean,3:Mediterrenian,4:Central,5:Black Sea,6:Southeast,7:East");
scanf("%d",homeregion);
if(homeregion==1)
printf("Marmara\n");
if(homeregion==2)
printf("Agean\n");
if(homeregion==3)
printf("Mediterrenian\n");
if(homeregion==4)
printf("Central\n");
if(homeregion==5)
printf("Black Sea\n");
if(homeregion==6)
printf("Southeast\n");
if(homeregion==7)
printf("East\n");
if(homeregion==1)```
bu i do not how to continue. could someone help guys.

prog-bman i beg your pardon, i'm new here.

*modedit nvoigt: fixed [ code ] blocks*

5. It compiles fine as C++ and he mentioned a C++ course so I see no reason why this should be in another board.

The code is also valid C, but that doesn't make it C only.

6. Well if that is the case why not just have a C++ board since well almost all C compiles as C++. It's just a waste of a board.

7. guys can you help me with this one?

Code:
```/* Problem Statement:
Write a program that reads a nonnegative integer and computes and prints its factorial.

*/

#include <stdio.h>

int main()
{

int num=0,numb;
unsigned factorial=1;

printf("Enter a nonnegative integer:");
scanf("%d",numb);

while(numb<0);
numb=-1;

while(num++<numb){
factorial*=num==0?1:num;
}

printf("this numb !%d is factorial",numb);

return 0;
}```
`if ( num > 0 ) factorial = factorial * num;`