A Logical Problem Which you almost confuse your Brain!!!
You go to a Shop you have only 100 INR. In that Shop, There is 3 types of Chocolates, one is 5 INR , another is 0.75 INR and the other is 0.25 INR. You must spend 100 INR with total 100 Chocolates only. Do not exceed or Deceed 100 Chocolates and 100 INR also you must buy all three Chocolates. Find How many Chocolates that you buy by spending 100 INR completely.
Code:
#include <stdio.h>
void main()
{
float a,b,c;
int i,j,k;
for(i=1;i<=100;i++)
{
for(j=1;j<=100;j++)
{
for(k=1;k<=100;k++)
{
a = 5*i;
b = 0.75*j;
c = 0.25*k;
if((i+j+k) == 100 && (a+b+c) == 100)
{
printf("how many 5 rs choco:%d\n",i);
printf("how many .75 rs choco:%d\n",j);
printf("how many .25 rs choco:%d\n",k);
printf("how much 5 rs choco:%.2f\n",a);
printf("how much .75 rs choco:%.2f\n",b);
printf("how much .25 rs choco:%.2f\n",c);
printf("***************\n");
}
}
}
}
}
OUTPUT:
how many 5 rs choco:6 how many .75 rs choco:93 how many .25 rs choco:1 how much 5 rs choco:30.00 how much .75 rs choco:69.75 how much .25 rs choco:0.25 *************** how many 5 rs choco:8 how many .75 rs choco:74 how many .25 rs choco:18 how much 5 rs choco:40.00 how much .75 rs choco:55.50 how much .25 rs choco:4.50 *************** how many 5 rs choco:10 how many .75 rs choco:55 how many .25 rs choco:35 how much 5 rs choco:50.00 how much .75 rs choco:41.25 how much .25 rs choco:8.75 *************** how many 5 rs choco:12 how many .75 rs choco:36 how many .25 rs choco:52 how much 5 rs choco:60.00 how much .75 rs choco:27.00 how much .25 rs choco:13.00 *************** how many 5 rs choco:14 how many .75 rs choco:17 how many .25 rs choco:69 how much 5 rs choco:70.00 how much .75 rs choco:12.75 how much .25 rs choco:17.25 ***************
I just coded using C you can do this with any other Languages. By Coding this you can find 5 solutions because 5 times 100 chocoloates and INR came. Therefore these are the Solutions....
UNIX-The Legendary OS
Intro to UNIX:
How many of them hear the word UNIX. Unix is an Operating System, For me It is Parent of all other OS and First OS.
![]() |
| UNIX-Parent Of All Other OS |
Evolution Of UNIX:
Over Multimillions years ago, First A Single Cell is born. Later it is evolving into MultiCellular Organisms like Ant,Frog,Snake,Eagle,Lion,Human. Like That UNix is evolved into FreeBSD and Then later Windows, Linux, Mac OS, Android. So Everyone Use these all ,So Everyone use This UNIX 100%
![]() |
| Unix |
I have provided Some links(OS Name) above.These are belong to UNix Family. Since Windows has some BSD Code it belongs to FreeBSD, So it also belongs to UNix.
How to install Snap Store on any Linux Distributions?
You can see Android Store(Play Store, Uptodown), Windows Store, Apple store. Most of the members may or may not be know about the Linux Store i.e. Snap Store.- Platform: Linux.
- Snapd already installed.
- Make sure you have a well internet connection.
# apt update# apt install snapd# systemctl enable --now snapd apparmor
$ snap install hello-world
hello-world 6.3 from Canonical✓ installed
$ hello-world
Hello World!# snap install snap-storePopular Posts
-
You can see Android Store(Play Store, Uptodown), Windows Store, Apple store. Most of the members may or may not be know about the Linux Stor...
-
Coding Question: You go to a Shop you have only 100 INR. In that Shop, There is 3 types of Chocolates, one is 5 INR , an...
-
Intro to UNIX : How many of them hear the word UNIX . Unix is an Operating System, For me It is Parent of ...
Social Media Icons
About Me
Contact Form
Search This Blog
Archive
Blog Description
Featured Posts
-
You can see Android Store(Play Store, Uptodown), Windows Store, Apple store. Most of the members may or may not be know about the Linux Stor...
-
Coding Question: You go to a Shop you have only 100 INR. In that Shop, There is 3 types of Chocolates, one is 5 INR , an...
-
Intro to UNIX : How many of them hear the word UNIX . Unix is an Operating System, For me It is Parent of ...


