multiple of 9 without useing +,* oprator
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.
what is computer engg
write a function to swap an array a[5] elements like a[0] as a[5],a[1] as a[4],....a[5] as a[0].without using more than one loop and use one array not to use temp array?
Explain how do you print only part of a string?
1. Write the function int countchtr(char string[ ], int ch); which returns the number of times the character ch appears in the string. Example, the call countchtr(“She lives in NEWYORK”, ‘e’) would return 3.
Tell us something about keyword 'auto'.
How can you draw circles in C?
Why is not a pointer null after calling free?
The operation of a stair case switch best explains the a) or operation b) and operation c)exclusive nor operation d)exclusive or operation Which of the following is/are syntactically correct? a) for(); b) for(;); c) for(,); d) for(;;);
1 Answers HCL, Public Service Commission,
Write a C Program to display the following menu: Menu 1. Display 2. Copy 3. Append 4. Exit Accept the choice (1-4) from the user, and perform the following tasks: Choice 1: Accept a file name from the user and display the file on screen Choice 2: Accept two file names, and copy first file to the second Choice 3: Accept two file names, and append second file to the first file Choice 4: Terminate the program
1 Answers Accenture, Concor, DMU, Satyam, Syntel, Tora,
what is out put of the following code? #include class Base { Base() { cout<<"constructor base"; } ~Base() { cout<<"destructor base"; } } class Derived:public Base { Derived() { cout<<"constructor derived"; } ~Derived() { cout<<"destructor derived"; } } void main() { Base *var=new Derived(); delete var; }
What are the types of data types and explain?