#25 Coding Challenge- 4 | Java Tutorial Series 📚 in Tamil | EMC Academy
ฝัง
- เผยแพร่เมื่อ 20 ม.ค. 2025
- Welcome back to the thrilling journey of our Java Tutorial Series in Tamil! In this video, we dive into the heart of coding challenges with Part-1 of our third week's challenge. Get ready to sharpen your Java skills as we unravel complex problems and conquer them together. This challenge is a testament to your growth and dedication in mastering Java programming. So, without further ado, let's dive in and tackle this challenge head-on. Stay tuned for Part-2, as the adventure continues. Let's get started and code our way to success! 🚀🔥
Java in Tamil.
Join our 700K+ Instagram community
www.instagram....
import java.util.Scanner;
public class school{
String passorfail(int marks)
{
if(marks>=40)
{
return"pass";
}
else{
return"Fail";
}
}
public static void main(String args[])
{
System.out.println("Enter your Maks out of 100");
Scanner Scan =new Scanner(System.in);
int Score = Scan.nextInt();
school obj1 = new school();
String result = obj1.passorfail(Score);
System.out.print(result);
}
}
1st Q
import java.util.Scanner;
public class find {
void evenorodd(int num1)
{
if(num1%2 ==0)
{
System.out.println("even");
}
else{
System.out.println("odd");
}
}
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int num1= input.nextInt();
find obj1 = new find();
obj1.evenorodd(num1);
}
}
Thankyou so much anna👍
Answer for Q1:-
import.java.util.Scanner;
Class find{
int evenorodd(int num)
{
if(num%2==0)
{
System.out.println("It is a even number");
return num;
}
else
{
System.out.println("It is a odd number");
return num;
}
public static void main (String[] args)
{
Scanner scan= new Scanner(System.in);
int num=scan.nextInt();
find obj=new find();
int result=obj.find(num);
}
}
Answer for Q2:-
import java.utill.Scanner;
Class school {
String passorfail(int totalmark)
{
if(totalmark>=35)
{
return "pass";
}
else
{
return "fail";
}
public static void main (String[] args)
{
Scanner scan=new Scanner (System.in);
int totalmark=scan.nextInt();
school obj=new school();
String result=obj.passorfail(totalmark);
System.out.println(result);
}
}
Import java.util.scanner;
Public class school;
{
String passorfail(int marks)
{
If marks < 35
{
System.our.println(“fail”);
Else
{
System.out.println(“pass”);
}
}
Public static void main (string args [])
{
Scanner sc = new scanner(system.in);
Int marks = ax.nextint();
School obj1 = new school ():
String result =Obj 1.passorfail(marks);
System.out.println(result);
}
package Java;
import java.util.Scanner;
public class School {
String passorfail(int marks){
if(marks >35) {
return "pass";
}
else {
System.out.print("fail");
}
return "fail";
}
public static void main(String[] args) {
System.out.println("Enter Your Makrs");
Scanner input = new Scanner(System.in);
int marks = input.nextInt();
School report = new School();
report.passorfail(marks);
}
}
import java.lang.System;
import java.util.Scanner;
class pa{
String passorfail(int k){
int passmark = 180;
if(k>passmark){
return "pass";
}
else{
return "fail";
}
}
public static void main(String[] args){
Scanner b = new Scanner(System.in);
int i = b.nextInt();
pa padi = new pa();
//padi.passorfail(i);
String res = padi.passorfail(i);
System.out.println(res);
}
}
// Online Java Compiler
// Use this editor to write, compile and run your Java code online
import java.util.*;
public class find {
void evenorodd (int num){
if(num % 2 == 0){
System.out.println("even");
}else{
System.out.println("odd");
}
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
find obj = new find();
obj.evenorodd (sc.nextInt());
}
}
import java.util.Scanner;
public class find {
String evenorodd(int num){
int i = num%2;
String result= "";
if(i==0){
result = "even";
}
else{
result = "odd";
}
return result;
}
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
System.out.println("Enter a Integer:");
int num = scan.nextInt();
find obj = new find();
String result = obj.evenorodd(num);
System.out.print(result);
}
}
👍
import java.util.Scanner;
public class pf {
void passfail(int a) {
if (a >= 35) {
System.out.print("Pass");
} else {
System.out.print("Fail");
}
}
public static void main(String args[]) {
Scanner data = new Scanner(System.in);
pf sam = new pf();
sam.passfail(30);
}
}
import java.util.*;
class school {
int passorfail(int num){
if(num >= 35){
System.out.println("pass");
}else{
System.out.println("Sorry you did not pass the exam !!!! ");
}
return num;
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
school obj1 = new school();
int s1=obj1.passorfail(sc.nextInt());
}
}
Anna c,c++ programming language upload Pannu ga anna please 🙏🙏🙏
Bro , I have try to print 1
22
444
But I have fail it,
Please explain it.....bro
import java.util.Scanner;
public class jd
{
public static void int main(String[] args)
{
Scanner scan=new Scanner(System.in);
System.out.println("Enter range of number to print number triangle to print");
int count=scan.nextInt(); // intha variable the ethana number varikum prinnt aganum nu solli decide pannum
for(int i=1; i
anna i studyed biology in my schl and now I wish to take ai and data science, could guide from which topic I have to start learning computer science
pls reply naa
nothing is needed bro ..just chill and in 1 st year concentrate on all the things they teach ...then you will itself get into the track ...mudinja C and python oda basics kathukonga
import java.util.*;
public class c26 {
void evenorodd()
{
Scanner s = new Scanner(System.in);
int num = s.nextInt();
if (num %2 ==0)
{
System.out.println("Even");
}
else
{
System.out.println("odd");
}
}
public static void main(String[] args) {
c26 c = new c26();
c.evenorodd();
}
}
import java.util.Scanner;
public class oddoreven{
void oddorevenn(int num){
if (num%2== 0){
System.out.print("The Given number is even");
}
else{
System.out.print("The given number is odd");
}
}
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
System.out.print("Enter the number to find odd or even :");
int num = scan.nextInt();
oddoreven obj1 = new oddoreven();
obj1.oddorevenn(num);
}
}
import java.util.Scanner;
public class School {
String passOrFail(int score){
if (score>35) {
return "Fail";
}else{
return "Pass";
}
}
public static void main(String[] args) {
Scanner scan = new Scanner(System.in); // first scnner create paniyachi
int totalMark = scan.nextInt(); // input vagudhal
School student = new School(); // oru object create pandren.
String result = student.passOrFail(totalMark); // andha object ah vachi function ah call pandren.
System.out.println(result);
}
}