i=20,k=0;
for(j=1;j<i;j=1+4*(i/j))
{
k+=j<10?4:3;
}

printf("%d", k);

Answer Posted / guest

compilation error i is not declared as int

Is This Answer Correct ?    5 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does the characters “r” and “w” mean when writing programs that will make use of files?

1167


How can I split up a string into whitespace-separated fields?

790


What is a stream water?

888


What is use of pointer?

771


What is getch () for?

878


The program will first compute the tax you owe based on your income. User is prompted to enter income. Program will compute the total amount of tax owed based on the following: Income Tax 0 - $45,000 = 0.15 x income $45,001 - $90,000 = 6750 + 0.20 x (income – 45000) $90,001 - $140,000 = 15750 + 0.26 x (income – 90000) $140,001 - $200,000 = 28750 + 0.29 x (income – 140000) Greater than $200,000 = 46150 + 0.33 x (income – 200000) Dollar amounts should be in dollars and cents (float point numbers with two decimals shown). Tax is displayed on the screen.

1275


Do you know the use of fflush() function?

797


What is an example of structure?

796


What is wrong in this statement?

810


What are the features of the c language?

836


Differentiate between null and void pointers.

864


What is a pointer in c?

958


What are the 5 types of inheritance in c ++?

755


What do you mean by c?

781


Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.

1831