Nama : Deab Sina
NIM : 49012078
Jurusan : D4 TMD ITB Batch 6
This is video about: Operator
Link to this video:
Source Code:
// Operator: Assignment, Unary, Incremnt, Decrement
#include <iostream>
using namespace std;
int main()
{
int i, j; // We declare varible int i and j
i = 10; // assignment operator (=)
j = -10; // unary operator (-)
cout<<"The value of i = "<<i<<endl;
cout<<"The value of j = "<<j<<endl;
cout<<"The value of ++i = "<<++i<<endl; // increment operator (++)
cout<<"The value of --j = "<<--j<<endl; // decrement operator (--)
system("pause");
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int i, j; // We declare varible int i and j
i = 10; // assignment operator (=)
j = -10; // unary operator (-)
cout<<"The value of i = "<<i<<endl;
cout<<"The value of j = "<<j<<endl;
cout<<"The value of ++i = "<<++i<<endl; // increment operator (++)
cout<<"The value of --j = "<<--j<<endl; // decrement operator (--)
system("pause");
return 0;
}
No comments:
Post a Comment