Click here to Skip to main content
15,890,670 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: uploadig adobe reader file in local host in c language Pin
Jochen Arndt4-Oct-15 22:54
professionalJochen Arndt4-Oct-15 22:54 
QuestionCFileDialog OnTypeChange issue Pin
_Flaviu1-Oct-15 20:59
_Flaviu1-Oct-15 20:59 
QuestionRe: CFileDialog OnTypeChange issue Pin
_Flaviu2-Oct-15 3:00
_Flaviu2-Oct-15 3:00 
AnswerRe: CFileDialog OnTypeChange issue Pin
Maximilien2-Oct-15 4:06
Maximilien2-Oct-15 4:06 
GeneralRe: CFileDialog OnTypeChange issue Pin
_Flaviu4-Oct-15 21:29
_Flaviu4-Oct-15 21:29 
QuestionA c program to project expected number of rabbits on a farm Pin
Arnold Mukisa29-Sep-15 8:27
Arnold Mukisa29-Sep-15 8:27 
AnswerRe: A c program to project expected number of rabbits on a farm Pin
Arnold Mukisa29-Sep-15 8:30
Arnold Mukisa29-Sep-15 8:30 
SuggestionRe: A c program to project expected number of rabbits on a farm Pin
David Crow29-Sep-15 15:42
David Crow29-Sep-15 15:42 
No need to have all of the if/else conditions within the for() loop. Try something a bit leaner, like:
#include <stdio.h>

int main()
{
    int initialrabbits,
        no_months,
        Kittens[10],
        Rabbits,
        kits,
        totalkittens = 0;

        printf("\nEnter initial no of rabbits:\a ");
        scanf("%d",&initialrabbits);
 
        printf("\nEnter number of months to be projected:\a ");
        scanf("%d",&no_months);
 
        for(int count=0;count<no_months;count++)
        {
            Kittens[count]=initialrabbits*8;
            Rabbits=initialrabbits;
            kits=Kittens[count];
            totalkittens+=Kittens[count];
 
            printf("\n\tMONTH %d",count);
            printf("\nNUMBER OF RABBITS: %d",Rabbits);
            printf("\nKittens produced this month: %d",kits);
            printf("\nTotal kittens now: %d\n",totalkittens); 
        }
 
    return 0;
}

"One man's wage rise is another man's price increase." - Harold Wilson

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles


GeneralRe: A c program to project expected number of rabbits on a farm Pin
David Crow29-Sep-15 15:34
David Crow29-Sep-15 15:34 
QuestionRe: A c program to project expected number of rabbits on a farm Pin
Paul Conrad1-Oct-15 7:33
professionalPaul Conrad1-Oct-15 7:33 
GeneralRe: A c program to project expected number of rabbits on a farm Pin
David Crow1-Oct-15 10:19
David Crow1-Oct-15 10:19 
Question0 bytes CImage saved Pin
_Flaviu28-Sep-15 23:47
_Flaviu28-Sep-15 23:47 
QuestionRe: 0 bytes CImage saved Pin
CPallini29-Sep-15 0:02
mveCPallini29-Sep-15 0:02 
AnswerRe: 0 bytes CImage saved Pin
_Flaviu29-Sep-15 0:06
_Flaviu29-Sep-15 0:06 
AnswerRe: 0 bytes CImage saved Pin
_Flaviu29-Sep-15 0:33
_Flaviu29-Sep-15 0:33 
SuggestionRe: 0 bytes CImage saved Pin
Jochen Arndt29-Sep-15 0:36
professionalJochen Arndt29-Sep-15 0:36 
GeneralRe: 0 bytes CImage saved Pin
_Flaviu29-Sep-15 0:57
_Flaviu29-Sep-15 0:57 
GeneralRe: 0 bytes CImage saved Pin
Jochen Arndt29-Sep-15 0:59
professionalJochen Arndt29-Sep-15 0:59 
GeneralRe: 0 bytes CImage saved Pin
_Flaviu29-Sep-15 1:00
_Flaviu29-Sep-15 1:00 
QuestionHow to drag a node from treeview to listbox in MFC. What is the event ? Pin
Member 1199023524-Sep-15 16:50
Member 1199023524-Sep-15 16:50 
AnswerRe: How to drag a node from treeview to listbox in MFC. What is the event ? Pin
Jochen Arndt24-Sep-15 22:13
professionalJochen Arndt24-Sep-15 22:13 
Questionhelp Pin
robsons200724-Sep-15 16:01
robsons200724-Sep-15 16:01 
AnswerRe: help Pin
robsons200724-Sep-15 16:05
robsons200724-Sep-15 16:05 
AnswerRe: help Pin
robsons200724-Sep-15 16:06
robsons200724-Sep-15 16:06 
GeneralRe: help Pin
Richard MacCutchan24-Sep-15 22:35
mveRichard MacCutchan24-Sep-15 22:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.