#include<stdio.h> int main() { float weight[50],profit[50],ratio[50],Totalvalue,temp,capacity,amount; int n,i,j; printf("Enter the number of items :"); scanf("%d",&n); for (i = 0; i < n; i++) { printf("Enter Weight and Profit for item[%d] :\n",i); scanf("%f %f", &weight[i], &profit[i]); } printf("Enter the capacity of knapsack :\n"); scanf("%f",&capacity); for(i=0;i<n;i++) ratio[i]=profit[i]/weight[i]; for (i = 0; i < n; i++) for (j = i + 1; j < n; j++) if (ratio[i] < ratio[j]) { temp = ratio[j]; ratio[j...
TechOrbitAI is your go-to hub for the latest breakthroughs, trends, and insights in the world of technology and artificial intelligence. Whether you're a tech enthusiast, developer, entrepreneur, or just someone who loves staying ahead of the curve, TechOrbitAI delivers cutting-edge news, in-depth articles, expert opinions, and AI-powered insights—all in one orbit.