12. Write a program in C++ to display any three districts of Jharkhand in separate(or different lines) on screen. The first line should display the heading THREE DISTRICTS OF JHARKHAND. (8) Example : THREE DISTRICTS OF JHARKHAND RANCHI JAMSHEDPUR DHANBAD
Answers
Answer:
Learning C++ programming can be simplified into:
Writing your program in a text-editor and saving it with correct extension(.CPP, .C, .CP)
Compiling your program using a compiler or online IDE
Understanding the basic terminologies.
The “Hello World” program is the first step towards learning any programming language and also one of the simplest programs you will learn. All you have to do is display the message “Hello World” on the screen. Let us now look at the program:
Answer:
The following C++ program will display any three districts of Jharkhand in separate(or different lines) on screen. The first line will display the heading THREE DISTRICTS OF JHARKHAND.
#include <iostream>
using namespace std;
int main()
{
char str1[20] = "RANCHI";
char str2[20] = "JAMSHEDPUR";
char str3[20] = "DHANBAD";
// To Display the Heading
cout << "\n\n THREE DISTRICTS OF JHARKHAND :\n";
cout << "----------------------------------------------\n";
/* To Display three districts of Jharkhand in separate i.e. in different lines on screen. */
cout << str1<<endl ;
cout << str2<<endl ;
cout << str3<<endl ;
}
Explanation:
output:
THREE DISTRICTS OF JHARKHAND :
----------------------------------------------
RANCHI
JAMSHEDPUR
DHANBAD
For more C++ program, click here:
https://brainly.in/question/1567971
https://brainly.in/question/8650