Skip to content

Commit 7255577

Browse files
committed
exe o test
1 parent c4d3fd1 commit 7255577

File tree

11 files changed

+179
-9
lines changed

11 files changed

+179
-9
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/.git
2+
/.exe
3+
/.o
4+
/.O

52 CP Problems/p11.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1 @@
1-
/************************************************************************/
2-
/* Name: Towfiqul Islam */
3-
/* uva id: 448714 */
4-
/* email id: towfiq.106@gmail.com */
5-
/* institute: IIUC */
6-
/* address: Chittagong, Bangladesh */
7-
/* */
8-
/************************************************************************/
9-
101

ACM_Lab_Class/488.C

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#include<stdio.h>
2+
int main()
3+
{
4+
int i,n,c,f,j,t,k;
5+
// freopen("e:\\488.in","r",stdin);
6+
scanf("%d",&t);
7+
8+
for(k=1;k<=t;k++)
9+
{
10+
11+
scanf("%d", &n);
12+
scanf("%d", &f);
13+
14+
15+
for(j=1;j<=f;j++)
16+
{
17+
18+
for(i=1;i<=n;i++)
19+
{
20+
for(c=1;c<=i;c++)
21+
printf("%d",i);
22+
printf("\n");
23+
}
24+
for(i=n-1;i>=1;i--)
25+
{
26+
for(c=1;c<=i;c++)
27+
printf("%d",i);
28+
printf("\n");
29+
}
30+
printf("\n");
31+
32+
}
33+
// if(k<f)
34+
// printf("\n");
35+
}
36+
37+
38+
39+
return 0;
40+
}

ACM_Lab_Class/PROG_1.C

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
//ACM 488
2+
#include<stdio.h>
3+
int main()
4+
{
5+
int i,j,k,l,t,n,o;
6+
//freopen("e:\\488.in","r",stdin);
7+
scanf("%d",&t);
8+
for(l=1;l<=t;l++)
9+
{
10+
scanf("%d",&n);
11+
scanf("%d",&o);
12+
13+
for(k=1;k<=o;k++)
14+
{
15+
for(i=1;i<=n;i++)
16+
{
17+
for(j=1;j<=i;j++)
18+
printf("%d",i);
19+
printf("\n");
20+
}
21+
for(i=n-1;i>=1;i--)
22+
{
23+
for(j=1;j<=i;j++)
24+
printf("%d",i);
25+
printf("\n");
26+
}
27+
printf("\n");
28+
}
29+
}
30+
return 0;
31+
}

ACM_Lab_Class/PROG_12.C

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// I I U P C 2 0 1 4 Problem I: Armstrong Number
2+
#include <stdio.h>
3+
int main()
4+
{
5+
int n, n1, rem, num=0,tc,i;
6+
scanf("%d",&tc);
7+
for(i=0;i<tc;i++)
8+
{
9+
scanf("%d", &n);
10+
n1=n;
11+
while(n1!=0)
12+
{
13+
rem=n1%10;
14+
num+=rem*rem*rem;
15+
n1/=10;
16+
}
17+
if(num==n)
18+
printf("Armstrong\n");
19+
else
20+
printf("Not Armstrong\n");
21+
}
22+
return 0;
23+
}

ACM_Lab_Class/PROG_2.C

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#include<stdio.h>
2+
int main()
3+
{
4+
int a[1000][1000],i,j,r,rc,rs;
5+
while(scanf("%d",&rc)==1)
6+
{
7+
if(r==0)
8+
break;
9+
for(i=0;i<rc;i++)
10+
{
11+
rs = 0;
12+
for(j=0;j<i;j++)
13+
{
14+
scanf("%d",&a[i][j]);//Give Sample input 3 4 5 6 8 9
15+
rs+=a[i][j];
16+
}
17+
}
18+
}
19+
printf("%d",rs);
20+
return 0;
21+
}

ACM_Lab_Class/prog_3_458.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Accepted, 458 - The Decoder
2+
#include<stdio.h>
3+
#include<string.h>
4+
5+
int main()
6+
{
7+
int i, n;
8+
char str[1000];
9+
while(gets(str)!=NULL)
10+
{
11+
n = strlen(str);
12+
for(i=0;i<n;i++)
13+
printf("%c",str[i]-7);
14+
printf("\n");
15+
}
16+
return 0;
17+
}

ACM_Lab_Class/prog_4_12577.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Accepted, 12577 - Hajj-e-Akbar
2+
#include<stdio.h>
3+
#include<string.h>
4+
5+
int main()
6+
{
7+
int i=0;
8+
char str[100];
9+
while(1)
10+
{
11+
gets(str);
12+
if(str[0]=='*')
13+
break;
14+
else if(str[0]=='H')
15+
printf("Case %d: Hajj-e-Akbar\n",++i);
16+
else
17+
printf("Case %d: Hajj-e-Asghar\n",++i);
18+
}
19+
return 0;
20+
}
21+

PROG_1.C

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//String Concatenation without using Library Function
2+
#include<stdio.h>
3+
int main()
4+
{
5+
int i,count,indx;
6+
char a[100],b[100];
7+
gets(a);
8+
gets(b);
9+
count = 0;
10+
for(i=0;a[i]!='\0';i++)
11+
count++;
12+
indx = count;
13+
for(i=0;b[i]!='\0';i++)
14+
{
15+
a[indx]=b[i];
16+
indx++;
17+
}
18+
a[indx]='\0';
19+
printf("%s\n",a);
20+
printf("%s",b);
21+
return 0;
22+
}

PROG_1.EXE

27.1 KB
Binary file not shown.

PROG_1.O

922 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)