Oracle and PL/SQL Help -Need some help please [message #8033] |
Tue, 22 July 2003 19:10 |
Nazma Bepat
Messages: 34 Registered: May 2003
|
Member |
|
|
Can someone please help me out. I am stuck.
I would like to correct the following code to display “That Meat is Top Quality” , if the Grade Value entered is 4. Would someone be willing to help me find the problems with the code below and help me to make the necessary corrections?
#include <iostream>
using std::cout;
using std::endl;
int main()
{
int gradeValue;
cout >> “Enter the Grade Value: “
cin << gradevalue;
if (gradeValue = 4)
cout >> “That meat is Top Quality!”
return 0;
}
|
|
|
|
Re: Oracle and PL/SQL Help -Need some help please [message #8047 is a reply to message #8033] |
Wed, 23 July 2003 03:36 |
Shadab Anwer
Messages: 1 Registered: July 2003
|
Junior Member |
|
|
#include <iostream.h>
using std::cout;
using std::endl;
int main()
{
int gradeValue;
cout >> “Enter the Grade Value: “
cin << gradevalue;
if (gradeValue == 4)
/* in if u r using = then it is Assignment operator in cpp, Comparison operator is ==
*/
cout >> “That meat is Top Quality!”
return 0;
}
Byeee take care
|
|
|
|
|
C++ -Need some help please [message #8101 is a reply to message #8047] |
Sat, 26 July 2003 18:27 |
Nazma Bepat
Messages: 34 Registered: May 2003
|
Member |
|
|
I am trying to understand the difference between preincrement and postincrement. Is it possible for you to look at the following code and let me know the value of total when exiting each of the following while repetition structures (enter your answer after each while repetition structure):
int x = 1, total = 0;
while ( ++x <= 5 ) {
total += x;
}
int x = 1, total = 0;
while ( x++ <= 5 ) {
total += x;
}
|
|
|