## Tuesday, 20 January 2015

### Java Program to print Floyd's triangle

This is a simple Java Program which prints out the Floyd's triangle with respect to the input given. Java Program to print Floyd's triangle

PROGRAM :
```package codingcorner.in;

import java.util.Scanner;

public class FloydsTriangle {
public static void main(String[] args) {
int i, j, k = 1, n;
Scanner scan = new Scanner(System.in);
System.out.print("Enter the range: ");
n = scan.nextInt();
scan.close();
System.out.print("\nFLOYD'S TRIANGLE : \n");
for (i = 1; i <= n; i++) {
for (j = 1; j <= i; j++, k++) {
System.out.print(k + "\t");
}
System.out.print("\n");
}
}
}```

OUTPUT : Java Program to print Floyd's triangle
{"ft_lang_label":"__label__en","ft_lang_prob":0.50996953,"math_prob":0.83920574,"size":645,"snap":"2019-13-2019-22","text_gpt3_token_len":172,"char_repetition_ratio":0.14196567,"word_repetition_ratio":0.04,"special_character_ratio":0.32248062,"punctuation_ratio":0.26760563,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98585856,"pos_list":[0,1,2,3,4],"im_url_duplicate_count":[null,1,null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-05-26T15:35:37Z\",\"WARC-Record-ID\":\"<urn:uuid:de0824dc-762d-4c5c-b3b6-61e599ecc528>\",\"Content-Length\":\"62532\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:ad6e5ad9-a7de-41ed-9291-9a536615e721>\",\"WARC-Concurrent-To\":\"<urn:uuid:4a136d5b-7814-4709-826a-e8db4556a47c>\",\"WARC-IP-Address\":\"172.217.7.243\",\"WARC-Target-URI\":\"https://www.mycodingcorner.com/2015/01/java-program-to-print-floyds-triangle.html\",\"WARC-Payload-Digest\":\"sha1:ZRCMTRKRYC7JROPRZ73XOTX32ZYVLXN7\",\"WARC-Block-Digest\":\"sha1:ZS5EJPTRGKJAHJ546I7M7FF3YMS6FQFO\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-22/CC-MAIN-2019-22_segments_1558232259316.74_warc_CC-MAIN-20190526145334-20190526171334-00220.warc.gz\"}"}