1 solutions
-
0
C :
#include <stdio.h> #include <stdlib.h> int main() { printf("1\n"); printf(" 2\n"); printf(" 3\n"); printf(" 4\n"); printf(" 5\n"); }C++ :
#include<iostream> #include<iomanip> using namespace std; int main() { for(int i=1;i<=5;++i) {cout<<setw(i)<<i<<endl;} return 0; }Pascal :
program p2631; var i,j:integer; begin for i:=1 to 5 do begin for j:=2 to i do write(' '); writeln(i); end; end.
- 1
Information
- ID
- 18046
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By