HOMEWORK

1. Write a number that sorts the numbers supplied by the user
sample output
Enter size of Array: 3
Enter number[0]=5
Emter number[1]=4
Enter number[2]=3
Your inputs are:
5 4 3
Enter number to search: 5
Found 5 at index 0

2. Write a program that converts number into words, Maximum numbers 9999, minimum 0.
sample output:
Enter number: 345
Three hunderd forty five

3. Write a program that converts number into Roman Numeral, Maximum numbers
sample output:
Enter number: 9
IX



now pleasE?
Last edited on
closed account (48T7M4Gy)
And the problem is ... ?
i cant solve it
i dont know i need help please?
closed account (48T7M4Gy)
Sacre bleu you must be able to start somewhere. Pseudocode, maybe a hello program modified just a bit.

If you do that and show us where you are stuck with your code then you'll save large amounts of your money.

At this stage that's about the best help you will get. We are very happy to help those who help themselves just a bit instead of shunting the problem off onto somebody else.

Of course if you like to give us your student ID and profs details. We won't be nasty or mean to you but we'll take the marks if it's our work. That would be only fair.
Please answer man. Please? number 1 only
closed account (48T7M4Gy)
Is it due tomorrow or this afternoon?
tommorow man
but i need it now because im finising 10 problems right know, if you answer number 1 i will use it as my basis
Last edited on
Double posting means we are even less likely to help.
Ow sorry, i deleted
Last edited on
I'll give you the loop of the entering part of the array:

1
2
3
4
for( a = 0; a < arrayA.size(); ++a )
{
    cin >> array[a];
}


This is assuming you've declared everything prim and proper by the way.
#include<iostream>
using namespace std;
int main()
{
int size;
cout<<"Enter size of Array: ";
cin>>size;
int numbers[size];
for (int x=0; x<size; x++)
{
int numbers;
cout<<"Enter a number["<<x<<"]= ";
cin>>numbers;

}
cout<<"Your Inputs are: "<<endl;
for (int x=0; x<size; x++)
{
cout<<numbers[x]<<" ";
}
int search;
cout<<endl<<"Enter number to search: ";
cin>>search;

for( int x=0 ; x<size ; x++)
{
if(numbers[x]==search)
{

cout<<"Found "<<search<<"at index"<<x<<endl;
}

}




system ("pause");
}


this is my code but wrong :(
Last edited on
HELP PLEASE?
#include<iostream>
using namespace std;
int main()
{
int size;
cout<<"Enter size of Array: ";
cin>>size;
int numbers[size];
for (int x=0; x<size; x++)
{
cout<<"Enter a number["<<x<<"]= ";
cin>>numbers[x];

}
cout<<"Your Inputs are: "<<endl;
for (int x=0; x<size; x++)
{
cout<<numbers[x]<<" ";
}
int search;
cout<<endl<<"Enter number to search: ";
cin>>search;

for( int x=0 ; x<size ; x++)
{
if(numbers[x]==search)
{

cout<<"Found "<<search<<" at index "<<x<<endl;
}

}




system ("pause");
}




I'VE SOLVED IT
Topic archived. No new replies allowed.