multiple of 9 without useing +,* oprator

Answers were Sorted based on User's Feedback



multiple of 9 without useing +,* oprator ..

Answer / guest

#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{clrscr();
int a,i,r=0;
scanf("%d",&a);

for(i=a;i>0;i--)
r=r-9;
r=abs(r);
printf("%d",r);
getch();
}

Is This Answer Correct ?    4 Yes 2 No

multiple of 9 without useing +,* oprator ..

Answer / tknowledge05

The above guest is me .. okkkkk....
by the time i solved and executing i was logged out and when i posted the answer it considered guest............

Is This Answer Correct ?    2 Yes 0 No

multiple of 9 without useing +,* oprator ..

Answer / jeke kumar gochhayat

this program is for any no
#include<stdio.h>
void main()
{
int n,k,c,l,i;
printf("enter the no");
scanf("%d",&n);
printf("which no of multiple u want");
scanf("%d",&l);
k=n;c=n;
for(i=1;i<l;i++)
{
while((n--)>0)
k++;
n=c;
}
printf("the multiple=%d",k);
}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

What are pointers? What are different types of pointers?

0 Answers   Fidelity,


How do you use a 'Local Block'?

0 Answers   Ericsson,


Write a program to reverse a string.

0 Answers   Global Logic, iNautix, TCS, Wipro,


List the difference between a While & Do While loops?

0 Answers   Accenture,


Define function pointers?

1 Answers  






What is break in c?

0 Answers  


a program that can input number of records and can view it again the record

0 Answers   Accenture,


What is calloc malloc realloc in c?

0 Answers  


Did c have any year 2000 problems?

0 Answers  


main() { printf("hello%d",print("QUARK test?")); }

5 Answers  


what are the advantages & disadvantages of unions?

2 Answers  


Find occurence of a character in a sting.

3 Answers   TCS,


Categories