Accenture Coding Assessment Questions and Answers 2024

  Рет қаралды 94,673

Prep Insta

Prep Insta

Күн бұрын

Пікірлер: 140
@onoonoonoO
@onoonoonoO Ай бұрын
everyone who is confident to crack Accenture placement like this ❤
@ridhamsharma7778
@ridhamsharma7778 Ай бұрын
*Well Explained JAVA Code* import java.util.Scanner; public class Vehicles { public static void main(String[] args) { // Creating Scanner object for taking input from user. Scanner sc = new Scanner(System.in); // Input no. of vehicles int v = sc.nextInt(); // Input no. of wheels int w = sc.nextInt(); // Checking given constraints if(v>w || w%2!=0 || w < 2) System.out.println("INVALID INPUT"); int tw = ((v*4)-w)/2; // v*4 gives us the no. of wheels reqd to create v no. of 4 wheelers. // (v*4)-w gives us the no. of wheels that we are short of. // Finally we use these remaining wheels to create Two Wheelers so ,((v*4)-w)/2. int fw = v-tw; System.out.println("TW = "+tw); System.out.println("FW = "+fw); } }
@Techno_lengend
@Techno_lengend Ай бұрын
Bro help me for code Accenture exam
@vaibhavihambire4828
@vaibhavihambire4828 2 ай бұрын
Bring more videos related to ACCENTURE..! Much Needed. Good to understand
@dakshjain273
@dakshjain273 2 ай бұрын
Bring more videos related to ACCENTURE..! Much Needed..❤
@pallavigupta4408
@pallavigupta4408 Ай бұрын
First we will take input for 'v' and 'w'. And initializing tw=0 and fw=0 If (w>=2 && w%2==0 && v
@ShrutiBansode-cd4pl
@ShrutiBansode-cd4pl Ай бұрын
@@pallavigupta4408 Why you copied my answer....😑
@CodeWithMeInJava-1
@CodeWithMeInJava-1 Ай бұрын
It's solving two equations
@bindulayam-hv1op
@bindulayam-hv1op 2 ай бұрын
Accenture is upcoming to our campus placement soon Need more videos to to Crack all the 3 rounds
@Ritikakhaire
@Ritikakhaire Ай бұрын
How are you preparing for coding rounds?
@nobikiduniya
@nobikiduniya Ай бұрын
Same here
@thecodingrookie
@thecodingrookie Ай бұрын
Which College ?
@mdsarfraz-2132
@mdsarfraz-2132 Ай бұрын
​@@thecodingrookieFor us also Accenture is coming soon for recruitment and the clg name: Avanthi Institute of engineering and technology
@bgmilovers5931
@bgmilovers5931 2 ай бұрын
Nice to clear my accenture test in my campus placement
@swagboltey102
@swagboltey102 2 ай бұрын
Kise Kiya apne muje bhi kuch tips do next month hai
@unknownseries8011
@unknownseries8011 2 ай бұрын
bhai kitane ka ctc diya h aap ke collage m
@swagboltey102
@swagboltey102 2 ай бұрын
@@unknownseries8011 abhi ni bola
@swagboltey102
@swagboltey102 Ай бұрын
​@@unknownseries8011tips do na
@siddharthsid1540
@siddharthsid1540 Ай бұрын
hey did you also clear the interview? And did they ask anything about project in the interview round?
@GKFactsAdda
@GKFactsAdda Ай бұрын
13:04 v = int(input("Enter the total number of vehicles: ")) w = int(input("enter total wheels: ")) tw=(4*v-w)//2 fw=v-tw print(tw) print(fw) ''' Time Complexity: O(1) Space Complexity: O(1) "'
@GKFactsAdda
@GKFactsAdda Ай бұрын
Keep uploading more videos on Accenture coding questions so that it will be helpful for students like me a lot.......
@user-kv9pv4vs4m
@user-kv9pv4vs4m Ай бұрын
This code showing error
@ranjitvyavahare7135
@ranjitvyavahare7135 2 ай бұрын
v = int(input("Enter the total number of vehicles: ")). w = int(input("enter total wheels: ")) tw=(4*v-w)//2 print(tw) print(fw) fw=v-tw
@noxgaming4954
@noxgaming4954 14 күн бұрын
(4*v-w)//2 why are you multiplying vehicles with 4??
@infinitecodes
@infinitecodes 22 күн бұрын
In Accenture coding round which type of editor we get, like leetcode wherevjust have to complete the function or codechef like we have to write code from scratch?
@mrmohan7246
@mrmohan7246 Ай бұрын
v=int(input("vehicle:")) w=int(input("wheels:")) if w%2==0 and 2
@yashjoshi-j6c
@yashjoshi-j6c 2 ай бұрын
Accenture will be in my college soon these videos are must needed
@yashwani8155
@yashwani8155 Ай бұрын
in the first question, they have asked minimum, so should we not sort the array first?
@soothingminds8866
@soothingminds8866 Ай бұрын
Sorting the array is not necessary in this case because the problem asks for the minimum number of houses required in the order they are given to provide enough food for the rats. The idea is to accumulate food house by house and stop as soon as you reach or exceed the required amount. This approach respects the original order of the houses, which is important because the question implies sequential distribution rather than an optimal selection from unordered data.
@underrated0806
@underrated0806 5 сағат бұрын
I think this can be understood based on sample cases
@binduk3669
@binduk3669 Ай бұрын
vehicles=int(input("enter no of vehicles: ")) wheels=int(input("enter no of wheels: ")) if wheels % 2 ==1 or wheels < 2 or wheels
@creativeminds9329
@creativeminds9329 22 күн бұрын
To solve the problem of finding the number of two-wheelers and four-wheelers given the total number of vehicles and wheels, you can use a system of linear equations. Let's denote: x as the number of two-wheelers (each having 2 wheels). y as the number of four-wheelers (each having 4 wheels). Given: v as the total number of vehicles. w as the total number of wheels. The equations are: 𝑥 + 𝑦 = 𝑣 x+y=v (Total number of vehicles) 2 𝑥 + 4 𝑦 = 𝑤 2x+4y=w (Total number of wheels) From equation 1, you can express y as: 𝑦 = 𝑣 − 𝑥 y=v−x Substitute this into equation 2: 2 𝑥 + 4 ( 𝑣 − 𝑥 ) = 𝑤 2x+4(v−x)=w This simplifies to: 2 𝑥 + 4 𝑣 − 4 𝑥 = 𝑤 2x+4v−4x=w 2 𝑣 − 2 𝑥 = 𝑤 − 4 𝑣 2v−2x=w−4v 𝑥 = 4 𝑣 − 𝑤 2 x= 2 4v−w ​ After calculating x, you can find y using: 𝑦 = 𝑣 − 𝑥 y=v−x
@sourabhvishwakarma6274
@sourabhvishwakarma6274 19 күн бұрын
Hello sir @PrepInsta this question is saying to minimum number of house to feed all the rats so the ans should be 2 (8,7) because in this, there is no any classification that the no. of house should be in a sequence. or ager sequence me bhi rakhna hota to bhi and 3 hi data (8,3,5) then why 4?
@jaanvirathore1850
@jaanvirathore1850 Ай бұрын
waah bhai aaj array input lene ka ek naya tareeka sikha mene.
@priyanshumandal733
@priyanshumandal733 2 ай бұрын
In the first question greedy approach should have been followed.
@saimanikantakaja3607
@saimanikantakaja3607 2 ай бұрын
V = int(input("Enter the total number of vehicles: ")) W = int(input("Enter total wheels: ")) if V >= W or W < 2 or W % 2 != 0: print("INVALID INPUT") TW = (4*V - W) // 2 FW = V - TW print("TW =",TW) print("FW =",FW)
@ajaykadi1140
@ajaykadi1140 2 ай бұрын
import numpy as np # Coefficients of the equations A = np.array([[1, 1], [2, 4]]) B = np.array([200, 540]) # Solving the system of equations solution = np.linalg.solve(A, B) # Extracting the number of two-wheelers and four-wheelers two_wheelers = int(solution[0]) four_wheelers = int(solution[1]) print(f"Two wheelers = {two_wheelers}") print(f"Four wheelers = {four_wheelers}")
@sathyaa4447
@sathyaa4447 2 ай бұрын
In my clg next month Accenture will come for on campus placement....i need prepinsta prime
@cybersolution-uv2xo
@cybersolution-uv2xo 2 ай бұрын
Which college are you studying?
@Anuusshaahhhh
@Anuusshaahhhh 2 ай бұрын
v = 200 w = 540 if w
@vishalmonitor1
@vishalmonitor1 Ай бұрын
Such a great Full video for us 💗 thank you sir 🙏
@yashjoshi-j6c
@yashjoshi-j6c 2 ай бұрын
pls explain in java or c++
@-Rajashekar-ot6sw
@-Rajashekar-ot6sw 2 ай бұрын
Your people are doing a great thing
@kunjmaheshwari9819
@kunjmaheshwari9819 Ай бұрын
in this question we can use Kadans Algorithm.
@shrutimore23
@shrutimore23 2 ай бұрын
Java program to calculate vehicle manufacture : import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner x = new Scanner(System.in); System.out.print("enter total number of vehicles : "); int v = x.nextInt(); System.out.print("enter total number of wheels : "); int w = x.nextInt(); if(2 0) { System.out.println("total four wheeler needed : "+fw); System.out.println("total two wheeler needed : "+tw); } else { System.out.println("INVALID INPUT"); } } }
@RajniLamkane
@RajniLamkane 2 ай бұрын
Excellent 👍
@challengemania4447
@challengemania4447 2 ай бұрын
I have a doubt.. Only 2nd house (8 unit of food) and 5the house (7 unit of food) is more than enough for all rats... Then why output is 4 houses ?
@rohanchawla9955
@rohanchawla9955 Ай бұрын
exactly i was thinking the same
@rohanchawla9955
@rohanchawla9955 Ай бұрын
why are we not applying greedy approach here
@vineetgoswami9954
@vineetgoswami9954 Ай бұрын
Exactly, first I saw the question I though it should be done with sorting ​@@rohanchawla9955
@vineetgoswami9954
@vineetgoswami9954 Ай бұрын
​@@rohanchawla9955i think we don't have to change the order of houses. If you found out this question reply
@soumyakantisadhu4676
@soumyakantisadhu4676 2 ай бұрын
when is accenture conducting their online assessments
@ayushrathore887
@ayushrathore887 Ай бұрын
this question demand the min no of house then why its output is 4. the correct ans would be 8,3,5 (3)....using greeedy or dp something...how you can solve this by starting at index 0.??can someone please correct me if im wrong with it ...
@shivanpatil1761
@shivanpatil1761 Ай бұрын
It is more easily exaplained in prepinsta about the test
@MANNEMROHITHKUMAR
@MANNEMROHITHKUMAR Ай бұрын
complect video on accenture sylabus and test pattern
@shas495
@shas495 14 күн бұрын
Can i use and inbuilt fuctions of STL in C++?
@sayanbhattacherjee9829
@sayanbhattacherjee9829 22 күн бұрын
we are told to define a function which accpets 3 parameters. you have taken a function which accept 4 parameters?
@indiansologamedeveloper
@indiansologamedeveloper Ай бұрын
for better performance do leetcode easy and mid lvl questions
@JerryHolland-f9m
@JerryHolland-f9m 13 сағат бұрын
v = int(input("How many vehicles: ")) w = int(input("How many wheels: ")) fw = int((w/2) - v) tw = int(v - fw) print("4 w", fw) print("2 w", tw)
@manojkumarchandora9800
@manojkumarchandora9800 Ай бұрын
In first question (8+7) > 14 minimum number is 2
@Hackthic
@Hackthic 18 күн бұрын
for this type of question develop the formula , it take hardly 10 min. and all the test cases will easily passed
@21M206BALAMURUGAN
@21M206BALAMURUGAN Ай бұрын
v=int(input("vehicle:")) w=int(input("wheels:")) if w%2==0 and 2
@nitheeshk9923
@nitheeshk9923 2 ай бұрын
The answer for last question V=int(input("Enter the no of vehicle")) W=int(input("Enter the no of Wheels")) if 2
@shairamayalvarez7753
@shairamayalvarez7753 Ай бұрын
Help.can someone explain to me about the constraints? 🥺 And how to conclude in that equation? 🙏🏻 Thanks in advance 💖
@lleviuchiha5565
@lleviuchiha5565 Ай бұрын
Sir can I solve Accenture coding assessment exam in javascript..... ?because in their company page they only mentioned c,c++,java, python languages....
@shairamayalvarez7753
@shairamayalvarez7753 Ай бұрын
Help.can someone explain to me about the constraints? 🥺 And how to conclude in that equation? 🙏🏻 Thanks in advance 💖
@meghanagarre
@meghanagarre 2 ай бұрын
How many of you Got the mail that test will be between 5-16 of july...But didnt get the mail update
@akashreddy7860
@akashreddy7860 20 күн бұрын
let x denote 2 wheelers and y denote 4 wheelers vehicles x+y=v 2x+4y=w y=v-x 2x+4(v-x)=w 4v-w=2x x=(4v-w)/2 y=v-x=v-(4v-w)/2=(w-2v)/2 Now once we get v and w inputs , we can easily calculate x and y using above problems in program.
@aashu0904
@aashu0904 Ай бұрын
Thank you sir
@sahilkarnahake4517
@sahilkarnahake4517 16 күн бұрын
I will complete my graduation in 2026..but i want to prep now kuch bhi ho jaye but job apne ko chahiye mtlab mtlab chahiye
@Ravi-tt6xw
@Ravi-tt6xw 16 күн бұрын
Hi bro, i have one doubt that my graduation aggregate is 60% exactly, can i able to attend this role or not , please reply me if anyone knows about this, please ! recently i got a mail from accenture regarding to the upcoming assessments, so if anyone knows about cutoff of a percentage please reply me !
@ChandanKumar-uy5fv
@ChandanKumar-uy5fv Ай бұрын
V = int(input("Number of vehicles: ")) W = int(input("Total number of wheels: ")) if V >= W or W < 2 or W % 2 == 1: print("INVALID INPUT") else: TW = 2*V - W // 2 FW = V - TW print("TW =",TW) print("FW =",FW)
@Freshvideos123
@Freshvideos123 2 ай бұрын
Can I get prime please??
@soumyakantisadhu4676
@soumyakantisadhu4676 2 ай бұрын
nhi
@SeeIt03
@SeeIt03 Ай бұрын
I joined in today's live in insta but there is no possibility of getting prime. For my career
@ShrutiBansode-cd4pl
@ShrutiBansode-cd4pl 2 ай бұрын
First we will take input for 'v' and 'w'. And initializing tw=0 and fw=0 If (w>=2 && w%2==0 && v
@ShrutiBansode-cd4pl
@ShrutiBansode-cd4pl 2 ай бұрын
One more thing in else part we will print('INVALID STATEMENT ')
@sakshijain2813
@sakshijain2813 2 ай бұрын
import java.util.*; public class MyClass { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int v= sc.nextInt(); int w= sc.nextInt(); int x=0; if(w w){ System.out.println("INVALID INPUT"); } else { x = (4*v -w)/2; System.out.println("TW =" + x +" FW = "+ (v-x) ); } } }
@Kumar954-s9d
@Kumar954-s9d Ай бұрын
v=int(input("no of vehicles:")); w=int(input("no of wheels:")); if(2
@VenkateswarluJettiboina
@VenkateswarluJettiboina Ай бұрын
v=int(input("Enter number of vechiles : ")) w=int(input("Enter number of wheels : ")) if(w
@biswajitdey2674
@biswajitdey2674 Ай бұрын
Sir group is full please make a another group please sir
@manhakkhan8666
@manhakkhan8666 Ай бұрын
Is it online or offline?
@kiranpawar8798
@kiranpawar8798 Ай бұрын
//java code static void count(int v, int w) { int temp =(w-(2*v)); if(temp==0){ System.out.println("only twoWheeler are there : "+ v); }else if(temp
@akshatkumar9879
@akshatkumar9879 Ай бұрын
last question is binary search
@hm-lq1ls
@hm-lq1ls Ай бұрын
class No_of_Vehicles { public static void main(String[] args) { int v=200; int w=540; no_of_vehicles(v,w); } public static void no_of_vehicles(int v,int w){ int two_wheel,four_wheel; four_wheel=(w-2*v)/2; two_wheel=v-four_wheel; System.out.println("Number of 2 wheel vehicles:"+two_wheel); System.out.println("Number of 4 wheel vehicles:"+four_wheel); } }
@user-qp7rt4nk9u
@user-qp7rt4nk9u Ай бұрын
done !
@conceptin15mins96
@conceptin15mins96 Ай бұрын
ur voice is very slow pleas use mic
@djdholan
@djdholan Ай бұрын
Total Wheels = 540 Total Vehicle = 200 (2 wheels + 4 wheels ) so x+y = 200 ----- total vehicle 2x + 4y = 540 -------- total Wheels from equation y = 200-x ------(put in equation ) 2x + 4*(200-x) = 540 2x + 800 - 4x = 540 800 - 2x = 540 -2x = -260 x = 130 --------(put in equation 1); 130 + y = 200 y = 70; so x =130 y = 70 now you get the solution code : public class sol{ main{ findNoOfVehical(200,540) } public static void findNoOfVehical(int v , int w){ int x; // 2 wheeler int y; // 4 wheeler x = (4 * totalVehicles - totalWheels) / 2; y = 200 - x sout(x); sout(y) } }
@shivanpatil1761
@shivanpatil1761 Ай бұрын
Next month we have campus placement for Accenture plz provide prepinsta prime
@NZxNIKHIL
@NZxNIKHIL Ай бұрын
from which college?
@shwetagurav5341
@shwetagurav5341 Ай бұрын
From which college?
@vinayborate2006
@vinayborate2006 27 күн бұрын
Sir please correct the question first , minimum number of houses visited we have to find !!😁😁😄😄
@user-dh9gq9uo7z
@user-dh9gq9uo7z 2 ай бұрын
import java.util.*; public class MyClass { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a= sc.nextInt(); int b= sc.nextInt(); int c=0; if(c c){ System.out.println("INVALID INPUT"); } else { c = (4*b -c)/2; System.out.println("two wheeler =" + c +" four wheeler = "+ (b-c) ); } } } Time complexity is O(1) for calculating number of tyres
@harish9479
@harish9479 2 ай бұрын
24 hrs working aggreement in Accenture 😢
@pavithrar6358
@pavithrar6358 Ай бұрын
Really??
@harish9479
@harish9479 Ай бұрын
Yes, one of my friend rejected the offer letter to this agreement
@ayushthaku.r
@ayushthaku.r Ай бұрын
Accenture is coming next month in my college please provide me subscription 🙏
@surajvarma5504
@surajvarma5504 23 күн бұрын
public class No_of_vehiciles { public static void main(String[] args) { Scanner obj = new Scanner(System.in); numOfVh(obj.nextInt(),obj.nextInt()); } public static void numOfVh(int v, int w){ int x=0; // two wheelers int y =0; // four wheelers int r = w-(2*v); y=r/2; x=v-y; System.out.println("Number of Two wheelers is " + x); System.out.println("Number of four wheelers is " + y); } }
@Shivambagade
@Shivambagade 2 ай бұрын
Java Code import java.util.Scanner; public class TwoWhellerFourWhellerProduction { public static void isValidProduction(){ Scanner s = new Scanner(System.in); System.out.print("Accept value of V."); int V = s.nextInt(); System.out.print("Accept value of W."); int W = s.nextInt(); if(W % 2 != 0 || V>W || 2>W){ System.out.println("INVALID INPUT"); } int TW, FW; TW = (4*V - W)/2; FW = V-TW; System.out.println("TW:"+TW+ " and FW:"+FW); } public static void main(String[] args) { isValidProduction(); } }
@bgmilovers5931
@bgmilovers5931 2 ай бұрын
v = 200 2 w = 540 if ( w < 2 or W
@varun1017
@varun1017 2 ай бұрын
OA dates?
@sandy24_sunshine09
@sandy24_sunshine09 Ай бұрын
v=int(input("Enter v:")) w=int(input("Enter w:")) if v>=w or w
@boopathi121
@boopathi121 Ай бұрын
It is python code?
@Lm-mu1up
@Lm-mu1up Ай бұрын
Give c++ code too
@PrinceKumar-ig5oc
@PrinceKumar-ig5oc 2 күн бұрын
jai javan jai kisan
@CodeWithMeInJava-1
@CodeWithMeInJava-1 Ай бұрын
Tw=(2*V)-(W/2) FW=V-TW
@Techno_lengend
@Techno_lengend Ай бұрын
Please any one help me ..for coding.round
@justforfun2043
@justforfun2043 4 күн бұрын
v=int(input()) w=int(input()) x=0 y=0 if w>=2 and w%2==0 and w>v: y = int((w-2*v)/2) x = int(v-y) print("Two wheelers:"+str(x)) print("Four wheelers:"+str(y))
@Ruthvik_20
@Ruthvik_20 2 ай бұрын
Prepinsta❤
@user-vk5ko9pi6f
@user-vk5ko9pi6f Ай бұрын
Hello, I rent accounts on freelance exchanges
@navaprasadgoud9530
@navaprasadgoud9530 18 күн бұрын
fw=(w-2*v)/2; tw=v-w; print("%d %d", &tw, &fw); I hope this two equ can be enough to solve the problem
@vaddineni5182
@vaddineni5182 Ай бұрын
in java import java.util.*; public class sai { public static void main(String[] args) { Scanner s = new Scanner(System.in); int v =s.nextInt(); int w =s.nextInt(); int x=0,y=0; for(int i=1;i
@Aa-cm1eo
@Aa-cm1eo 2 ай бұрын
SOLUTION FOR FREE PRIME
@AnuBiju-y7e
@AnuBiju-y7e 2 ай бұрын
v=int(input("enter vechiles number")) w=int(input("enteer the wheels no")) for i in range(0,200): for j in range(0,200): if(i+j==v): two=i four=j if(i*2+j*4==w): print("2wheell 4wheeler",i,j) break
@rjshakti54
@rjshakti54 2 ай бұрын
Bhai nahi hua😢😢
@anamtaxxxkhan
@anamtaxxxkhan 2 ай бұрын
On-campus start hogaya?
@arghyadeepsarkar5759
@arghyadeepsarkar5759 2 ай бұрын
Need prime badly 😢
@ammulu6150
@ammulu6150 2 ай бұрын
Bhai tumney leliya prime
@darjiabdulmouize4302
@darjiabdulmouize4302 Ай бұрын
import java.util.*; public class Main { public static void main(String[] args) { System.out.println("Hello World"); Scanner sc=new Scanner(System.in); int v=sc.nextInt(); int w=sc.nextInt(); int z=w/2; int cars=z-v; int bikes=v-cars; System.out.println(bikes+" "+cars); } }
@sayanbhattacherjee9829
@sayanbhattacherjee9829 13 күн бұрын
#include #include int main() { int i, vehicle, wheel, twCount=0, fwCount=0; printf("Enter vehicle that should be manufactured : "); scanf("%d",&vehicle); printf(" Enter wheel number : "); scanf("%d",&wheel); if(wheel>2 && wheel%2==0 && vehicle*2
@MonaKumari-h4i
@MonaKumari-h4i Ай бұрын
import java.util.Scanner; public class VehicleManufacture { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int V = scanner.nextInt(); int W = scanner.nextInt(); // Constraints check if (W < 2 || W % 2 != 0 || V >= W) { System.out.println("INVALID INPUT"); } else { // Calculating the number of two-wheelers int TW = (4 * V - W) / 2; // Calculating the number of four-wheelers int FW = V - TW; if (TW < 0 || FW < 0) { System.out.println("INVALID INPUT"); } else { System.out.println("TW = " + TW + ", FW = " + FW); } } scanner.close(); } }
@anilkumarvagicharala8258
@anilkumarvagicharala8258 Ай бұрын
import java.util.Scanner; public class Vehcile{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); System.out.println("enter the no of vechiles"); int v = sc.nextInt(); System.out.println("enter the no of wheels"); int w = sc.nextInt(); int tw = (4*v - w)/2; int fw = v-tw; if( tw>=0 && fw>=0 && (2*tw + 4*fw == w)){ System.out.println("no.of tw:" +tw); System.out.println("no.of.fw:" +fw); }else{ System.out.println("no vaild"); } } }
@balasubramanie5354
@balasubramanie5354 2 ай бұрын
// Online Java Compiler // Use this editor to write, compile and run your Java code online import java.util.Scanner; class HelloWorld { public static void vehiclesProduced(int v, int w) { //x -> 2 wheelers y -> 4 wheelers //x + y = v //2x + 4y = w //y = (w - 2v)/2 //x = v - y int y = (w - 2*v)/2; int x = v - y; System.out.println("Two wheelers: "+x+" Four Wheelers: "+y); } public static void main(String[] args) { Scanner in = new Scanner(System.in); int v = in.nextInt(); int w = in.nextInt(); if (w < 2 || w % 2 != 0 || v >= w) { System.out.println("INVALID INPUT"); } else { vehiclesProduced(v, w); } } }
@149-cse-sumandhar3
@149-cse-sumandhar3 2 ай бұрын
import java.util.Scanner; public class VehicleProduction { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.print("Enter the total number of vehicles (V): "); int V = scanner.nextInt(); System.out.print("Enter the total number of wheels (W): "); int W = scanner.nextInt(); if (W >= 2 * V && W % 2 == 0 && V < W) { int FW = (W - 2 * V) / 2; int TW = V - FW; System.out.println("Number of two-wheelers (TW): " + TW); System.out.println("Number of four-wheelers (FW): " + FW); } else { System.out.println("INVALID INPUT"); } scanner.close(); } }
@BhavishMK-h8g
@BhavishMK-h8g Ай бұрын
v = 200 w = 540 if w
@ankushbokade6085
@ankushbokade6085 Ай бұрын
def wheels(Tw,Fw): Sum=(Tw*2)+(Fw*4) print(Sum) Tw=int(input("enter the no. of TW = ")) Fw=int(input("enter the no. of FW = ")) wheels(Tw,Fw)
@SathishSathish-qn3ol
@SathishSathish-qn3ol 2 ай бұрын
v = int(input("Enter the total number of vehicles: ")) w = int(input("enter total wheels: ")) tw=(4*v-w)//2 fw=v-tw print(tw) print(fw)
Accenture Pseudocode Questions and Answers 2024
17:43
Prep Insta
Рет қаралды 42 М.
Violet Beauregarde Doll🫐
00:58
PIRANKA
Рет қаралды 53 МЛН
Bend The Impossible Bar Win $1,000
00:57
Stokes Twins
Рет қаралды 45 МЛН
Coding Was HARD Until I Learned These 5 Things...
8:34
Elsa Scola
Рет қаралды 379 М.
Accenture Original Interview Recorded Live 🔴 | Complete Video
10:10
Classic Technology
Рет қаралды 56 М.
Latest Accenture Coding Questions Solved (August 2024)
13:37
Prime Coding
Рет қаралды 15 М.
🔥Accenture Most Repeated MS office and N/W Questions 🔥
30:54
OnlineStudy4u
Рет қаралды 38 М.