-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoutput.html
More file actions
150 lines (150 loc) · 9.5 KB
/
Copy pathoutput.html
File metadata and controls
150 lines (150 loc) · 9.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<!-- change println and print and प्रिन्ट प्रिन्टलन in print.html and java/one4 and replace print program into one line code in all images
change ank and other words and in last note change print to println and vice versa.
-->
<html>
<head>
<script type="text/javascript" src="scripts/article.js"></script>
<link rel="stylesheet" href="style/article.css" />
</head>
<body onload="load()" next="comments.html" prev="syntax.html">
<h1>Print/Print Output |
<select name="H/E" onchange="set(this.value)">
<option value="english">English</option>
<option value="hindi">हिन्दी(Hindi)</option>
</select><br>
<input type="button" value="pervious" onclick="pchapter()">
<a class="btn" onclick="nchapter()" href="#"><span> →</span>NEXT</a>
</h1>
<chapter>
<h2> Print :</h2>
<p>
<e>
We learned from the previous topic that you can use the <c>println()</c> method to output values or print text in our programming language:
</e>
<h>
हमने पिछले अध्याय से सीखा है कि आप हमारी प्रोग्रामिंग भाषा में मूल्यों को लिख के दिखाने केलिए (आउटपुट या प्रिंट करने केलिए) <c>println()</c> विधि का उपयोग कर सकते हैं:
</h>
</p>
<div class="code-container">
<div class="code TOE" id="editor">
सार्वजनिक कक्षा Main {
सार्वजनिक स्थिर रिक्त जरूरी (डोर [] a){
तंत्र.बाहर.प्रिंट("Hello World");
}
}</div></div>
<p>
<e>
We can add as many <c>println()</c> methods as you want. Note that it will add a new line for each method:
</e>
<h>
आप जितनी चाहें उतनी <c>println()</c> विधियाँ जोड़ सकते हैं. ध्यान दें कि यह प्रत्येक विधि केलिए एक नई लाइन जोड़ देगा:
</h><br>
</p><div class="code-container">
<div class="code TOE" id="editor">
सार्वजनिक कक्षा Main {
सार्वजनिक स्थिर रिक्त जरूरी (डोर [] a){
तंत्र.बाहर.प्रिंट("Hello World");
तंत्र.बाहर.प्रिंट("Iam learning a language");
तंत्र.बाहर.प्रिंट("This is awesome!");
}
}</div></div>
<h2> Double Quotes|दो बोलियां/कोट्स/उद्धरण| <c>" "</c> </h2>
<p>
<e>
When you are working with text, it must be wrapped inside double quotations marks <c>" "</c>.<br>
If you forget the double quotes, an error occurs:
</e>
<h>
जब आप (screen पर) लेखन या लिखने का कार्य कर रहे हों, तो इसे दोहरे उद्धरण <c>" "</c> चिह्नों के अंदर लपेटा जाना चाहिए. <br>यदि आप दोहरे उद्धरण भूल जाते हैं, तो एक त्रुटि/गलती/एरर(Error) उत्पन्न होती है:
</h>
</p>
<e>This sentence will work :</e>
<h>ये काम नहीं करेगा :</h>
<div class="code-container"style="height :5%">
<div class="code TOE" id="editor">
तंत्र.बाहर.प्रिंट("This will work!|ये काम करेगा");</div></div>
<e>This sentence will produce an ERROR :</e>
<h>ये काम नहीं करेगा और त्रुटि (Error) देगा :</h>
<div class="example" style="background-color:#ff1a1a;height :10%"><div class="code-container">
<div class="code TOE" id="editor">
तंत्र.बाहर.प्रिंट(This sentence will produce an ERROR);</div></div></div>
<h2> The Print() Method|
<!-- Replace-->
मुद्रण() विधि</h2>
<p>
<e>
There is also a <c>print()</c> method, which is similar to <c>println()</c>.<br>The only difference is that it does not insert a new line at the end of the output:
</e>
<h>
एक <c>print()</c> विधि भी है, जो <c>println()</c> के समान है।<br>दोंनो मे एकमात्र अंतर यह है कि यह आउटपुट के अंत में एक नई लाइन सम्मिलित नहीं करता है या जोड़ता नहीं है :
</h><br>
</p>
<div class="code-container"style="height :10%">
<div class="code TOE" id="editor">
तंत्र.बाहर.प्रिंट("Hello World! ");
तंत्र.बाहर.प्रिंट("I will print on the same line.");</div></div>
<p>
<div class="note">
<e>
<h3 class="h-note">Note :</h3>
Note that we add an extra space (after "Hello !" in the example above), for better readability.
</e>
<h>
<h3 class="h-note">ध्यान दे:</h3>
ध्यान दें कि हम बेहतर पठनीयता(पढ़ने की क्षमता) केलिए एक अतिरिक्त स्थान (ऊपर दिए गए उदाहरण में "hello! " के बाद जगह(स्पेस) छोड़ते हैं)|
</h>
</div>
</p>
</chapter>
<chapter>
<h2> Print Numbers :</h2>
<p>
<e>
You can also use the <c>println()</c> method to print numbers.
However, unlike text, we don't put numbers inside double quotes:
</e>
<h>
आप संख्याओं को मुद्रित करने केलिए <c>println()</c> विधि का भी उपयोग कर सकते हैं।<br>
हालाँकि,सादाहरण लेखन के विपरीत, हम संख्याओं को दोहरे उद्धरणों या कोट्स <c>" "</c> के अंदर नहीं डालते हैं:
</h>
</p><div class="code-container"style="height :15%">
<div class="code TOE" id="editor">
तंत्र.बाहर.प्रिंट(8);
तंत्र.बाहर.प्रिंट(798);
तंत्र.बाहर.प्रिंट(50000);</div></div>
<p>
<e>
You can also perform mathematical calculations(add, substract etc.) inside the <c>println()</c> method:
</e>
<h>
आप <c>println()</c> विधि के अंदर गणितीय गणना (जोड़ना,घटना आदि) भी कर सकते हैं:
</h>
</p>
<div class="code-container">
<div class="code TOE" id="editor">
तंत्र.बाहर.प्रिंट(8+4);
तंत्र.बाहर.प्रिंट(15-6);
तंत्र.बाहर.प्रिंट(5*6);
तंत्र.बाहर.प्रिंट(36/6);
तंत्र.बाहर.प्रिंट(50%3);</div></div>
<p>
<div class="note">
<e>
<h3 class="h-note">Note :</h3>
You can do these operations/calculations in the <c>print()</c> and in <c>println()</c> method difference is that it won add a new line but not write it in same line.<br>
Also you can add multiple <c>println()</c> and <c>print()</c> methords one after other as we did before.
</e>
<h>
<h3 class="h-note">ध्यान दे:</h3>
आप <c>print()</c> और <c>println()</c> विधि में समान तरीके से गणना कर सकते हैं, अंतर यह है कि यह एक नई पंक्ति नहीं जोड़ेगा बल्कि इसे उसी पंक्ति में लिखेगा या कहे जोड देगा । इसके अलावा, आप एक के बाद एक कई <c>println()</c> और <c>print()</c> विधियों को जोड़ सकते हैं जैसा कि हमने पहले किया था।
</h>
</div>
</p>
</chapter>
<script src="scripts/article.js"></script>
<script src="scripts/ace.js"></script>
<script src="scripts/cobalt.js"></script>
<script src="scripts/mode-javaa.js"></script>
<script>codeload();</script>
</body>
</html>