#include<iostream>
int main (void) {
std::cout << "1 22 333 444\n";
}
To produce the text programmatically:
#include<iostream>
int main (void) {
for (int num=1; num<=4; ++num) { // the number to be printed
for (int rep=1; rep<=num; ++rep) { // the repetitions of that number
std::cout << num;
}
std::cout << ' '; // space
}
std::cout << '\n'; // new line
}
#include <stdio.h> int main (void) { puts ("1 22 333 4444 55555"); return 0; }
int i = 4;while (i>0) { for (int n=0; n<i; ++n) { printf ("%d", i); } printf (" "); } printf ("\n");
#include <stdio.h> int main (void) { puts ("4 1 44 11 444 111 4444 1111 000000000 444444 3333 22 1"); return 0; }
using System;namespace RightAngleTraingle{class Program{static void Main(string[] args){for (int x = 1; x
Each digit is repeated the number of times equal to its value. 1 22 333 4444 55555 666666 7777777 88888888 999999999
This is one of possible solutions:
22 x 11 x 101 = 4444
REMPATTERNS (not necessary) CLS FOR I = 1 TO 5 STEP +1 FOR J = 1 TO I STEP+1 PRINT J NEXT J PRINT NEXT I END Hope you find this helpful :)
Implement this method: public static void makeTriangle(int limit) { int count = 0; for(int i = 1; i <= limit; i++) { count = i; while(count > 0) { System.out.print(i); count--; } System.out.println(); } }
355
write a program to print the series 1/12+1/22+.........+1/n2 ?
22 and 333 are composite numbers.