Home » Programming » Java Programming » Output a string for many times in Java , C programming, JavaScript & Php

9 years ago (Sep 06, 2015) 2,616 views

Output a string for many times in Java , C programming, JavaScript & Php

Category: Java Programming, Programming Tags: , , , , , , by

Here I am providing source code of a prograam.. By using this you can get the out put of a single input string for many times.You can do it by using a single for loop. So let’s Start

 

#Java

package Practice;

public class StringGenarate {

public static void main(String[] args) {
int n=100;
for (int i = 0; i < n; i++) {
System.out.println(“Here you need to give your input”);
}

}

}

 

#C_Programming

#include <stdio.h>
int main(){
int n=100;
int i=0;
for(i=0;i<n;i++){
printf(“Here you need to give your input\n”);
}
return 0;
}

 

#JavaScript

<!DOCTYPE html>
<html>
<body>

<p>It will excute the text for 100 times</p>

<p id=”demo”></p>

<script>
var text = “”;
var i;
for (i = 0; i < 100; i++) {
text += “Here you need to give your input <br>”;
}
document.getElementById(“demo”).innerHTML = text;

</script>

</body>
</html>

 

#Php

<?php
$n=0;
$txt=”Here you need to give your input<br/>”;
for($n=0;$n<100;$n++){
echo $txt;

}
?>

 

NB:Change the value of variable “n” 100 to how much output you want!

Output:

Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input
Here you need to give your input

About Post: 134

Love to play with programs!! :D

31 responses to “Output a string for many times in Java , C programming, JavaScript & Php”

  1. … [Trackback]

    […] Read More here: en.trickbd.com/output-a-string-for-many-times-in-java-c-programming-javascript-php/6932 […]

  2. … [Trackback]

    […] Informations on that Topic: en.trickbd.com/output-a-string-for-many-times-in-java-c-programming-javascript-php/6932 […]

  3. … [Trackback]

    […] Informations on that Topic: en.trickbd.com/output-a-string-for-many-times-in-java-c-programming-javascript-php/6932 […]

  4. … [Trackback]

    […] Informations on that Topic: en.trickbd.com/output-a-string-for-many-times-in-java-c-programming-javascript-php/6932 […]

  5. porno says:

    … [Trackback]

    […] Read More: en.trickbd.com/output-a-string-for-many-times-in-java-c-programming-javascript-php/6932 […]

  6. … [Trackback]

    […] Informations on that Topic: en.trickbd.com/output-a-string-for-many-times-in-java-c-programming-javascript-php/6932 […]

  7. sekis izle says:

    … [Trackback]

    […] Read More: en.trickbd.com/output-a-string-for-many-times-in-java-c-programming-javascript-php/6932 […]

  8. seks izle says:

    … [Trackback]

    […] Read More here: en.trickbd.com/output-a-string-for-many-times-in-java-c-programming-javascript-php/6932 […]

  9. … [Trackback]

    […] There you will find 28103 more Infos: en.trickbd.com/output-a-string-for-many-times-in-java-c-programming-javascript-php/6932 […]

  10. anami sikin says:

    … [Trackback]

    […] Read More Infos here: en.trickbd.com/output-a-string-for-many-times-in-java-c-programming-javascript-php/6932 […]

  11. … [Trackback]

    […] Find More Informations here: en.trickbd.com/output-a-string-for-many-times-in-java-c-programming-javascript-php/6932 […]

  12. this page says:

    … [Trackback]

    […] Informations on that Topic: en.trickbd.com/output-a-string-for-many-times-in-java-c-programming-javascript-php/6932 […]

  13. … [Trackback]

    […] Read More here: en.trickbd.com/output-a-string-for-many-times-in-java-c-programming-javascript-php/6932 […]

  14. Free hosting says:

    … [Trackback]

    […] Read More: en.trickbd.com/output-a-string-for-many-times-in-java-c-programming-javascript-php/6932 […]

  15. … [Trackback]

    […] Informations on that Topic: en.trickbd.com/output-a-string-for-many-times-in-java-c-programming-javascript-php/6932 […]

  16. … [Trackback]

    […] Read More: en.trickbd.com/output-a-string-for-many-times-in-java-c-programming-javascript-php/6932 […]

  17. … [Trackback]

    […] Read More: en.trickbd.com/output-a-string-for-many-times-in-java-c-programming-javascript-php/6932 […]

  18. … [Trackback]

    […] Informations on that Topic: en.trickbd.com/output-a-string-for-many-times-in-java-c-programming-javascript-php/6932 […]

  19. now says:

    … [Trackback]

    […] Read More: en.trickbd.com/output-a-string-for-many-times-in-java-c-programming-javascript-php/6932 […]

Leave a Reply