//program to generate following output.
/*
10
20
19
*/
#include <iostream>//header file
using namespace std;//to handle all standard characters/functions,reserved words used in program. we do not use in turboc++ compiler.
int main()//main function
{
int number=10;
cout<<number<<endl;//prints 10
number+=10; //increses the value by 10
cout<<number<<endl;//prints the 10
cout<<--number;//prints 19 using prefix decrement operator.
return 0;
}
/*
10
20
19
*/
#include <iostream>//header file
using namespace std;//to handle all standard characters/functions,reserved words used in program. we do not use in turboc++ compiler.
int main()//main function
{
int number=10;
cout<<number<<endl;//prints 10
number+=10; //increses the value by 10
cout<<number<<endl;//prints the 10
cout<<--number;//prints 19 using prefix decrement operator.
return 0;
}