Belajarlahh disini Gan!!!
Ini sekilass Source code nyaa....
Bisaa Kalian Copy gann.....
#Simple Script C++ :
#Calculating with integer constants
#Using the assignment operator
#Define an int variable
#Define and assign int variables
#Use arithmetic operator to get the product of two integers
#Do calculation in cout
Ini sekilass Source code nyaa....
Bisaa Kalian Copy gann.....
#Simple Script C++ :
#include <iostream>
using namespace std;
int main()
{
cout << "www.mi-lp3i.co.cc";
return 0;
}
#Calculating with integer constants
#include <iostream>
using std::cout;
using std::endl;
int main() {
cout << 1 + 2 << endl;
cout << 1 - 5 << endl;
cout << 1 - 2 << endl;
return 0;
}
#Using the assignment operator
#include <iostream>
using std::cout;
using std::endl;
int main() {
int a = 10;
int b = 6;
int c = 3;
int d = 4;
int f = (a + b)/(c + d);
cout << f ;
return 0;
}
#Define an int variable
#include <iostream>
using namespace std;
int main()
{
int length; // this declares a variable
length = 7; // this assigns 7 to length
cout << "The length is ";
cout << length; // This displays 7
return 0;
}
#Define and assign int variables
#include <iostream>
int main()
{
int a=0, b=0, x=0, y=35;
std::cout << "a: " << a << " b: " << b;
std::cout << " x: " << x << " y: " << y << std::endl;
a = 9;
b = 7;
y = x = a+b;
std::cout << "a: " << a << " b: " << b;
std::cout << " x: " << x << " y: " << y << std::endl;
return 0;
}
#Use arithmetic operator to get the product of two integers
#include <iostream>
using namespace std;
int main()
{
int length;
int width;
int area;
length = 7;
width = 5;
area = length * width; // compute area
cout << "The area is ";
cout << area;
return 0;
}
#Do calculation in cout
#include <iostream>
using namespace std;
int main()
{
int length;
int width;
length = 6;
width = 9;
cout << "The area is ";
cout << length * width;
return 0;
}
Indra Jaya
2:09 AM
0 Responses to "Visual C++ (Visual Studio)"
Post a Comment