PDA

View Full Version : C++ (Need help)



A.Z
October 3rd, 2005, 02:29 PM
Write a program that inputs a five-digit number, separates the number into its individual digits and print the digits separated from one another by three spaces each.

ok now i have made the program but i dont know how to separate the numbers by three spaces each :confused:

can anybody help me ?

this is the program:


#include <iostream>
int main()
{
int num1;
int num2;
int num3;
int num4;
int num5;

std::cout <<"enter 5 digit numbers\n";

std::cin>> num1 >> num2 >> num3 >> num4 >> num5;

( num1!= num2 != num3 != num4 != num5 )
;std::cout << num1 << num2 << num3 << num4 << num5;

return 0;
}

f won
October 3rd, 2005, 11:51 PM
dont worry i do c++ too
what you have to do is this

;std::cout<<num1<<" "<<num2<<" "<<num3<<" "<<num4<<" "<<num5;

with 3 spaces between the inverted commas

good luck

A.Z
October 4th, 2005, 01:27 AM
dont worry i do c++ too
what you have to do is this

;std::cout<<num1<<" "<<num2<<" "<<num3<<" "<<num4<<" "<<num5;

with 3 spaces between the inverted commas

good luck

I have done it thnx for the info :crazy:

f won
October 5th, 2005, 10:40 PM
very welcome any other probs jus ask me

A.Z
October 6th, 2005, 02:12 AM
very welcome any other probs jus ask me

Inshala bro ;)

designo
October 6th, 2005, 02:09 PM
Are you programming an IC for any particular reason? I am interested to know what you're working on!

Thanks

Gulf_Exhaust
October 6th, 2005, 09:24 PM
Designo u must an electronic engineer :D i study electronics at school.....

designo
October 7th, 2005, 02:51 PM
Well if you need any help, let me know!

Kayman
October 7th, 2005, 03:33 PM
damn I used to do C++ easily in 11th and 12th grades but now I forgot everything :D

Gulf_Exhaust
October 7th, 2005, 03:38 PM
Thnx D , I appreciate that:D....

holleya
February 17th, 2006, 01:49 AM
C++ looks more complicated than the pascal and the visual basic ..

i'm already done with the pascal thingy although they canceled it now cuz it's an old language and no one is using it..

i took visual basic last semester and im taking it this semester too ..
:blink: :blink: :blink:

A.Z
February 17th, 2006, 12:52 PM
C++ looks more complicated than the pascal and the visual basic ..

i'm already done with the pascal thingy although they canceled it now cuz it's an old language and no one is using it..

i took visual basic last semester and im taking it this semester too ..
:blink: :blink: :blink:
to me C++ is better than Pascal :electric:

f won
February 17th, 2006, 01:56 PM
the best thing bout c++ is that if u know it u can easily use visual c++ which is a great app

TAG
February 17th, 2006, 02:15 PM
each of them (C, C++, pascal, Perl, VB, etc) are good for doing something a bit easier than the other! for example, perl is used to write CGI. But the most games are done by C++. Also, most hard core programming is done by C++ because it is faster in compailing!!!

TAG
February 17th, 2006, 02:18 PM
Also, JAVA is used for web programming because it is understandable by all machines (MAC, Windows, UNIX, etc.). All others has to be compiled and run on the same OS!

f won
February 17th, 2006, 02:30 PM
but java based apps takes so much ram when u are using it(specially limewire)