Contact Us Get link Facebook X Pinterest Email Other Apps Loading… Get link Facebook X Pinterest Email Other Apps Comments
Mukesh and Salima was looking to buy Organic Apples in the nearest fruits shop.But Shop Owner mixed the Hybrid apples in that Apple box. After sometimes Mukesh checking the box, he was confused among organic and hybrid apple. He started to count the hybrid apples. Please help to Mukesh Count the total number of hybrid apples in the box. #include <stdio.h> #include<string.h> int main() {int numofapples ,x,i,c=0; scanf("%d",&numofapples); int arr[100]={0}; for(i=0;i<numofapples;++i){ scanf("%d",&x); arr[x]++; } for(i=0;i<100;++i){ if(arr[i]>1)c+=(arr[i]-1); } printf("%d",c); return 0; } Read more
On one beautiful Sunday Selvan went to Aaron's house for exam preparation. They have decided to study Mathematics subject because they have exams by coming Monday, Aaron is a master in Mathematics but Selvan is not so good in Mathematics so James trained with Selvan for getting a high score in the exam. After teaching some problems to Selvan.Aaron have given some tasks to Selvan to solve .The problem is to convert input float into a double. Can you help Selvan in finding the solution ? #include <stdio.h> int main() {float num1,num2; scanf("%f\n %f",&num1,&num2); double resnum1,resnum2; resnum1=num1; resnum2=num2; printf("%lf",resnum1); printf("\n%lf",resnum2); return 0; } Read more
Professor JD has lots of options. Bottles containing all types of potions are stacked on shelves which cover the entire wall from floor to ceiling. Professor JD has broken his bones several times while climbing the top shelf for retrieving a potion. He decided to get a ladder for him. But he has no time to visit Charu. So he instructed Bargav to make a ladder for him. Professor JD specifically wants a step ladder that looks like an inverted 'V' from a side view.What should be the length of RS? At one extreme LS can be vertical and at other RS can be vertical. find the minimum and maximum length of Rs. #include <stdio.h> #include <math.h> int main(){ float b,ls,rs1,rs2; scanf("%f %f",&b,&ls); rs1=sqrt((ls*ls)-(b*b)); rs2=sqrt((ls*ls)+(b*b)); printf("%0.5f %0.5f",rs1,rs2); return 0;} Read more
Comments
Post a Comment