REMPATTERNS (not necessary)
CLS
FOR I = 1 TO 5 STEP +1
FOR J = 1 TO I STEP+1
PRINT J
NEXT J
NEXT I
END
Hope you find this helpful :)
Cls
for a = 1 to 5
for b = 1 to a
print a;
next b
next a
end
CLS
FOR outerLoopNo% = 1 TO 5
FOR innerLoopNo% = 1 TO outerLoopNo%
PRINT outerLoopNo%;
NEXT
NEXT
END
int main() { int i,j,sum,k; for(i=1;i<=5;i++) { k=1; sum =0; for(j=1;j<=i;j++) { sum = sum+(i*k); k=k*10; } cout<< sum; cout<< "\n"; } }
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(); } }
#include <stdio.h> int main (void) { puts ("1 22 333 4444 55555"); return 0; }
#include<math.h> main() { int s=1,n,x,i; clrscr(); printf("enter value of n"); scanf("%d",&n); printf("enter value of x"); scanf("%d",&x); for(i=1;i<=n;i++) { s=pow(x,i); } printf("sum of series=%d",s); getch(); }
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:
The Roman numeral for 4444 is MMMMCDXLIV. The square root of 4444 is 66.663.
int main() { int i,j,sum,k; for(i=1;i<=5;i++) { k=1; sum =0; for(j=1;j<=i;j++) { sum = sum+(i*k); k=k*10; } cout<< sum; cout<< "\n"; } }
500000 + 4444 = 504444
1000000 + 4444 = 1,004,444
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(); } }
4444 - 40% = 2,666.4
3333 times 4444 = 14811852
55 + 4444 - 3 = 4496
13.3453
It is: 44+4444+5 = 4493