445,797 Members | 1,848 Online
Need help? Post your question and get tips & solutions from a community of 445,797 IT Pros & Developers. It's quick & easy.

gettin d average!!

 P: 29 write a program that will accept 2 integer numbers from the user and then display out all the integer numbers in between those two integers excluding the two numbers, then display the avg among the output displayed. Expand|Select|Wrap|Line Numbers #include using namespace std;   int main() { double one,two,i,j,sum=0,a,b;//declaring variables     cout<< "first value = ";//ask for first num cin>>one;               //first input cout<<"second value = ";//ask for second num cin>>two;               //second input   cout<<'\n';             //skip a line          if(two>one){             for(i=one;i<=two;i++)             cout<< i <
4 Replies

 Expert 100+ P: 315 write a program that will accept 2 integer numbers from the user and then display out all the integer numbers in between those two integers excluding the two numbers, then display the avg among the output displayed. #include using namespace std; int main() { double one,two,i,j,sum=0,a,b;//declaring variables cout<< "first value = ";//ask for first num cin>>one; //first input cout<<"second value = ";//ask for second num cin>>two; //second input cout<<'\n'; //skip a line if(two>one){ for(i=one;i<=two;i++) cout<< i <

 P: 29 wo thnks alot! really helped... Mar 18 '07 #3

 P: 1 write a program that will accept 2 integer numbers from the user and then display out all the integer numbers in between those two integers excluding the two numbers, then display the avg among the output displayed. #include using namespace std; int main() { double one,two,i,j,sum=0,a,b;//declaring variables cout<< "first value = ";//ask for first num cin>>one; //first input cout<<"second value = ";//ask for second num cin>>two; //second input cout<<'\n'; //skip a line if(two>one){ for(i=one;i<=two;i++) cout<< i <

 Expert 2.5K+ P: 3,652 printf and scanf are functions used mainly in C, but have been replaced by cout and cin in C++. You can still use scanf/printf if you include the header file Mar 19 '07 #5