Skip to content

Commit 077ac6e

Browse files
authored
Add files via upload
1 parent 4ca6367 commit 077ac6e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+618
-0
lines changed

Module 6/A_Timon_and_Pumbaa.bin

40 KB
Binary file not shown.

Module 6/A_Timon_and_Pumbaa.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#include<stdio.h>
2+
int main()
3+
{
4+
int a,b;
5+
scanf("%d %d",&a,&b);
6+
int mns=a-b;
7+
if(mns>=0)
8+
{
9+
printf("%d",mns);
10+
}
11+
else
12+
{
13+
printf("0");
14+
}
15+
return 0;
16+
}

Module 6/B_Even_Numbers.bin

40.5 KB
Binary file not shown.

Module 6/B_Even_Numbers.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#include<stdio.h>
2+
int main()
3+
{
4+
int n;
5+
scanf("%d",&n);
6+
if(n==1)
7+
{
8+
printf("-1\n");
9+
}
10+
else
11+
{
12+
for(int i=1;i<=n;i=i+1)
13+
{
14+
if (i%2==0)
15+
{
16+
printf("%d\n",i);
17+
}
18+
}
19+
20+
}
21+
return 0;
22+
}

Module 6/B_Even_Numbers.exe

40.5 KB
Binary file not shown.
40.4 KB
Binary file not shown.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#include<stdio.h>
2+
int main()
3+
{
4+
int n;
5+
scanf("%d",&n);
6+
int a;
7+
int even=0,odd=0,pos=0,neg=0;
8+
for(int i=1;i<=n;i=i+1)
9+
{
10+
scanf("%d",&a);
11+
if(a%2==0)
12+
{
13+
// even
14+
even++;
15+
}
16+
else
17+
{
18+
//odd
19+
odd++;
20+
}
21+
22+
if(a>0)
23+
{
24+
// positive
25+
pos++;
26+
}
27+
else if(a<0)
28+
{
29+
// neg
30+
neg++;
31+
}
32+
}
33+
printf("Even: %d\nOdd: %d\nPositive: %d\nNegative: %d",even,odd,pos,neg);
34+
return 0;
35+
}

Module 6/C_Next_Alphabet.bin

39.9 KB
Binary file not shown.

Module 6/C_Next_Alphabet.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#include<stdio.h>
2+
int main()
3+
{
4+
char n;
5+
scanf("%c",&n);
6+
if(n==122)
7+
{
8+
printf("%c",97);
9+
}
10+
else
11+
{
12+
printf("%c",n+1);
13+
}
14+
return 0;
15+
}
40.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)