zandiago 115 Nearly a Posting Maven Featured Poster

Ok...now i get you. I perhapds did mis-understand you initially. So what you'll have to do (this isn't the entire answer, but it's a start):

#include <iostream.h>
//other headers
using namespace std;
main()
{

int num; //user input
int a,b;  //used for integer division and modulus operations
cout <<"Enter a two digit number." <<endl;
cin >> num;
#= #/10; //do calculation                           
# = #%10;//do calculation
cout<<#<<#<<endl;
double average = (# + # )/2;
cout<<average<<endl;

enough spoon feeding, you can figure out how to do the rest...or fill in the blanks, show us what you've come up with!

zandiago 115 Nearly a Posting Maven Featured Poster

Welcome aboard. A few things additionally. This is an outline:

<Your headers>

using namespace std;

int main ()
{
1. declare a few variables...int, float...
2. cout<<"enter two numbers to get the average"<<endl;//ask the user ro input two digits.
3. cin>>num1>>num2;//makes the user enter two numbers
4. You get the total of the numbers and then divide by the amt of numbers/digits.
5. You can figure out the rest. Hope this helps.
zandiago 115 Nearly a Posting Maven Featured Poster

welcome aboard....please post what you've got so that w can guide you. Here is some pointers:
1. start with your headers, you'll need to figure out which ones you'll need:

#include<iostream>

2. You need:

using namespace std; 

int main()

3. you need to declare some variables:

int num;

4. Ask the user to input a number:

cout << "Enter an integer: ";

5.Allow the user to input:

cin >> num;

6. For the actual calculation, we use the modulos (%) operator. From basic math/algebra, you ought to know theoretically, how to calculate even and odd numbers....do they have remainders....if they do...what's the remainder.
7.

if (expression)
	statement1
else
	statement2

The above test to see if the number is odd or not...if it is, do something...if it's not....do something.
8. Then you'll need output statements (answers to provide) to you professor:

cout << num << " is an odd number" << endl;

In the future....search the internet(GOOGLE)...or the frum to see if the problem has been covered already.
10. most importantly...to be successful in c++ you'll simply have to do the work....and practice...
Hope this helps...have a good day!

zandiago 115 Nearly a Posting Maven Featured Poster

if u bought it....u wasted your money....you can get FREE compilers

zandiago 115 Nearly a Posting Maven Featured Poster

Lmao

zandiago 115 Nearly a Posting Maven Featured Poster

I don't know why the compilers aren't working on Vista...i've got vista on my laptop. I'm able to use devC++ & microsoft's visual and they both compile programs ok. What problem you get exactly when you try to compile a program?

zandiago 115 Nearly a Posting Maven Featured Poster

If you've got the correct answer....and the probelm is solved....please post it for the benefit of the entire community.

zandiago 115 Nearly a Posting Maven Featured Poster

I'm not talking about the formatting for your class...i'm talking about formatting the code for the forum....again...read the two announcements at the top of the page...

zandiago 115 Nearly a Posting Maven Featured Poster

Good day and welcome aboard. A few things.
You could use something like this:

int smallestIndex( int arr[], int size)
{
    int smallestIndex=0;
    int temp=arr[0];
    for(int i=0;i<size;i++)
    {
       if(arr[i]<temp)
       {
           smallestIndex = i;
           temp=arr[i];
        }
     }
   return i;
}

Hope that helps.

zandiago 115 Nearly a Posting Maven Featured Poster

Welcome aboard..hope you'll enjoy it here. Your formatting is horrible...please look at the two anouncements at the top of the page, so you can place your code in tags. Also, in the future, before posting, search the forums to see if someone else had the same problem/assignment. We are willing to help, but we don't want to waste time doing the same thing over and over again...here are a few links that may be able to help you:
http://www.daniweb.com/forums/showthread.php?t=51631&highlight=Fibonacci+number+series
http://www.daniweb.com/forums/showthread.php?t=94074&highlight=Fibonacci+number+series
You can search around for the others....also....Google is your friend.

zandiago 115 Nearly a Posting Maven Featured Poster

please post your latest code

zandiago 115 Nearly a Posting Maven Featured Poster

Hello there, if you notice that your PC is running a bit crazy, it maybe possible that computer is infected. In addition to viruses, your computer may be infected with spywares, Trojans, worms, adwares, viruses and other malwares. Also, I do recommend that you clean/restore your registry files…if these are corrupted, your PC will act crazy. The software to help you with your registry: RegCure and Regpair.

Icon Restore: http://www.majorgeeks.com/download4125.html

zandiago 115 Nearly a Posting Maven Featured Poster

This specific problem has been addressed before. In the future, please search the forum before you post, chances are that someone else had that assignment/problem. Please take a look at the following thread for some guidance:
http://www.daniweb.com/forums/thread49939.html
Hope that help and welcome aboard. By the way, as a new person, you did good in the proper way of posting in terms of formating with code tags. Except, in the furure:
before adding your code, use ["code=cplusplus"]
code here
and use ["/code"] when your done. This way it number your code, so when you start doing longer/harder assignments we can follow your code line by line.

zandiago 115 Nearly a Posting Maven Featured Poster

Please post what you've tried so we can tell you where your error is. Welcome aboard

zandiago 115 Nearly a Posting Maven Featured Poster

I have a quick thought. Many persons who join the forums are usually students who are required to take a course, for example C++. After the student has completed their course and have received the help from the forum, many never return here. So the inactive accounts/profiles...pretty much just hang around..

zandiago 115 Nearly a Posting Maven Featured Poster

Not everything on the internet is true!!!

zandiago 115 Nearly a Posting Maven Featured Poster

Oh boy....so whats gonna happen to the forum...

zandiago 115 Nearly a Posting Maven Featured Poster

Strayed off topic about the olympics but....The end of the world...2012? Maybe before that, as a possible new-cold war may emerge...

zandiago 115 Nearly a Posting Maven Featured Poster

well, if you change the 'int' to another number characteristic, you'll bypass some of the restrictions. What restrictions are you trying to bypass or implement?

zandiago 115 Nearly a Posting Maven Featured Poster

Take a brief look at this:

#include <iomanip>
#include <cmath>
#include <fstream>
#include <string>
#include<string>
#include<iostream>

using namespace std;


int main()
{

	int num1 = 0;
	int num2 = 0;

	cout<<"Please enter two numbers to get their total"<<endl;
	cin>>num1>>num2;

	double sum = (num1 + num2);
	cout<<sum<<endl;
	return 0;
}

Also, when you're posting your code, please place them in code & # number tags as it makes it easier to read for those helping.

zandiago 115 Nearly a Posting Maven Featured Poster

A few things. A decent start, but remember to include the header <cmath>. Another thing, are you wanting to determine the lenght of the number that the user inputs?

zandiago 115 Nearly a Posting Maven Featured Poster

A few things: We only provide help, we don't give away codes. You must also try to think about it on your own.
Minimum value for a variable of type short. –32768.
Maximum value for a variable of type short. 32767.
Visit here for some other relavnt information:http://msdn2.microsoft.com/en-us/library/ms860861.aspx I have the entire program (i had to do it a while back for a project), so i'll help you along but give it a shot. See what you come up with and post it here. See you around.

zandiago 115 Nearly a Posting Maven Featured Poster

What's the purpose of the '^' (carot) symbol in C\C++?

zandiago 115 Nearly a Posting Maven Featured Poster

Hello there, if you notice that your PC is running a bit crazy, it maybe possible that computer is infected. In addition to viruses, your computer may be infected with spywares, Trojans, worms, adwares, viruses and other malwares. Please let us know what type of computer you have and also what anti-virus program you’ve used. Personally, if a PC is infected, I do recommend using more than one antiviris program to help you. My personal recommendation for cleanup softwares are : Adware SE, ACE, Avast, AVG, Mcafee, ParetoLogic XoftSpySE, PREVX and spyware be-gone. Also, I do recommend that you clean/restore your registry files…if these are corrupted, your PC will slow down. The software to help you with your registry: RegCure and Regpair. Some of the above mentioned programs can be downloaded at www.cnet.com. Please use these utilities and let’s know the outcome. The removal of viruses and other malwares does affect your PC registry.. Also try http://www.kaspersky.com/virusscanner , let is scan your computer. Do the following to post a hi-jack log which we'll address for you, you must first download the software from:http://www.download.com/HijackThis/3000-8022_4-10379544.html

zandiago 115 Nearly a Posting Maven Featured Poster

I guess that his professor was real adamant in him using while loops for the program instead of the good 'ol for loops...

zandiago 115 Nearly a Posting Maven Featured Poster

You said that the antivirus programs had completely removed the viruses? I'll check on your log and get back to you.

zandiago 115 Nearly a Posting Maven Featured Poster

You also need to be careful of some hHoax emails that can allow somemalwares to piggy-back onto your system and also keyloggers. I reccm getting a software which prevents against key-loggers.

zandiago 115 Nearly a Posting Maven Featured Poster

In addition to viruses, you should check your PC (just as precaution) for Trojan's, spyware, malware,adware, worms ect...With regards to cleaning the registry, several softwares can be found @ www.cnet.com/www.download.net....My personal recommendation for your registry are Reg-Soft and X Soft-Spy to better protect your computer.

zandiago 115 Nearly a Posting Maven Featured Poster

The virus may have affected your registry...you may need to reset/clean your windows registry files.