Answered Questions

  • Tricky C Program questions

    1)Write a C program to find a peculiar two digit number which is three times the sum of its digits.2) Bacteria are known to multiply very rapidly. If a certain container contains just one bacterium on the first day and there are twice as many on the next day. In this manner the number of bacteria in the container doubles itself everyday. Assuming that the container would be full on the 10th day with...

    Aneesh

    • Jul 29th, 2016

    27

    Code
    1. #include<stdio.h>
    2. #include<conio.h>
    3.  void main()
    4.   {
    5.     int i,k,a,sum=0;
    6.     clrscr();
    7.      for(i=10;i<=99;i++)
    8.       {
    9.           k=i;
    10.           a=k%10;
    11.           k=k/10;
    12.           sum=(a+k)*3;
    13.           if(sum==i)
    14.            printf("%d",i);
    15.        }
    16.      getch();
    17.   }

    Rohan

    • Jun 18th, 2015

    I dont know if its optimized but works"c {/*There are some goats and ducks in a farm. There are 60 eyes and 86 foot in total. Write a program to find number of goats and ducks...