Skip to content

Commit 8c747dc

Browse files
Merge pull request #15 from nirajand/main
Mammal.java and skip multiples of 3.c
2 parents 287cd08 + 5cd7606 commit 8c747dc

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// 1 2 4 5 7 8 10
2+
#include<stdio.h>
3+
int main(){
4+
int i;
5+
for(i = 1; i <= 10; i++){
6+
if(i % 3 == 0){
7+
continue;
8+
}
9+
else{
10+
printf("%d \t", i);
11+
}
12+
}
13+
return 0;
14+
}

First Year/Second Semester/Everything Lab/Java/Lab 5/src/Mammal.java

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
class Animal {
44

5+
String Happy;
6+
Animal(String Happy){
7+
this.Happy = Happy;
8+
}
59
public void makeSound() {
610
System.out.println("Animal Sound");
711
}
@@ -10,6 +14,7 @@ public void makeSound() {
1014
class Dog extends Animal {
1115

1216
public void makeSound() {
17+
super.makeSound();
1318
System.out.println("Dog Sound: Bark");
1419
}
1520
}

0 commit comments

Comments
 (0)