this is my p phone number in punjabi
Step 1: Include necessary libraries
#include <iostream>
using namespace std;
In C++, we need to include the iostream library in order to use the input/output stream functionalities like printing to the console. The using namespace std;
line is used to avoid having to write std::
before every standard library function call.
Step 2: Declare the main function
int main() {
In C++, the main
function is the entry point of the program. It is where the execution of the program starts.
Step 3: Declare the phone number variable
string phoneNumber = "ਮੇਰਾ ਫੋਨ ਨੰਬਰ ਹੈ: 1234567890";
Here, we declare a string variable named phoneNumber
and assign it the value of the phone number in Punjabi. The string
type is used to store a sequence of characters.
Step 4: Print the phone number
cout << phoneNumber << endl;
The cout
object is used to print the value of phoneNumber
to the console. The <<
operator is used to insert the value of phoneNumber
into cout
. The endl
is used to insert a new line after printing.
Step 5: Return from the main function
return 0;
}
The return 0;
statement is used to indicate the successful execution of the program. It is conventionally used as the last line of the main
function.
Complete code example:
#include <iostream>
using namespace std;
int main() {
string phoneNumber = "ਮੇਰਾ ਫੋਨ ਨੰਬਰ ਹੈ: 1234567890";
cout << phoneNumber << endl;
return 0;
}
This code will output the phone number in Punjabi: ਮੇਰਾ ਫੋਨ ਨੰਬਰ ਹੈ: 1234567890.