Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
need help c programmers help me!!!?
i need help in this
write a program to find the sum of even digit and odd digit between 1-100
multiply wthout using * operator for the given no
write a program to print the fibonacci series
0 1 1 2 3 5 8 13
10 Answers
- Anonymous1 decade agoFavorite Answer
Additional assignment: count the number of errors in Puneet S's solution.
Hint: even though the code is only 10 lines, there is more than one error. And that's not counting the redundant opening and closing brackets, NOR counting the non-standard definition of main().
Extra credit: find iyiogrenci's mistake (I'm not referring to the use of a system-specific extension).
Extra extra credit: find abhi r's mistake.
Extra extra extra credit: find Amit's mistake.
- ?Lv 45 years ago
Programming skill is self reliant of programming language. in certainty, the appropriate programmers are sturdy at any language they use, and for any given language, there are the two very undesirable and intensely sturdy programmers. a sturdy programmer will write extra effectual application than a unfavorable programmer no count number what languages are genuinely used. a sturdy programmer can write a extra effectual software in Lisp or Algol than a unfavorable programmer can write in C or Java. The language relatively makes no distinction. And specific, genuinely learn has been achieved that exhibits this. the only people who heavily have self belief that one language is extra effectual than yet another, or that programmers utilising one language are extra effectual than programmers utilising others, are youngsters and absolute newcomers in IT. as quickly as I see claims like this, it only makes me smile, because of the fact the persons making the claims are effectively showing every person else that they haven't any clue.
- 1 decade ago
Ok well..u hav got codes 4 ol da problems Except 1 prob... da 2nd prob..
Multiplication widout using *:
Multiplication is nothing but a repeated addition..so here goes da logic part of it...
Let A be da multiplicant and B be the multiplier..Eg lets multiply 3*5
#include<stdio.h>
#include<conio.h>
Void main()
{
Int A,B,i,Ans=0;
cout<<"Enter the Multiplicant:"<<endl
cin>>A
Cout<<"Enter the Multiplier:"<<endl
cin>>B
for(i=1;i<=B;i++)
{
Ans=Ans+A;
}
Cout<<"The result is:"<<Ans;
}
- iyiogrenciLv 61 decade ago
Fibonacci program:
#include <iostream>
using namespace std;
int main(void) {
double n; /* The number of fibonacci numbers we will print */
int i; /* The index of fibonacci number to be printed next */
double current; /* The value of the (i)th fibonacci number */
double next; /* The value of the (i+1)th fibonacci number */
double twoaway; /* The value of the (i+2)th fibonacci number */
cout << "\n\n";
cout << "How many Fibonacci numbers do you want to compute? ";
cin >> n;
if (n<=0)
cout << "The number should be positive. " << endl;
else {
cout << "\n\n\tI \t Fibonacci(I) \n\t=====================\n";
next = current = 1;
for (i=1; i<=n; i++) {
cout << "\t" << i << "\t" << current << endl;
twoaway = current+next;
current = next;
next = twoaway;
}
}
system("pause");
}
- How do you think about the answers? You can sign in to vote the answer.
- 1 decade ago
//ANSWER 1
//program to find sum of even and odd nos bet 1-100
#include<stdio.h>
#include<conio.h>
void main()
{
int i,s1=0,s2=0;
for(i=1;i<=100;i++)
{
if(i%2==0)
s1=s1+i;
else
s2=s2+i;
}
printf("\n The sum of even numbers bet1-100 is=%d",s1);
printf("\n The sum of odd numbers bet1-100 is=%d",s2);
}
- Anonymous1 decade ago
int oddsum=0;
int i;
for(i=1;i<100;i=i+2)
oddsum=oddsum+i;
use the same method for even...
- Anonymous1 decade ago
program to find sum of even digit and odd digit
#include<iostream.h>
void main()
{ int i,sum1=0,sum2=0;
{ for ( i=1; i<100;i=i+2)
sum1=sum1+i;}
cout<<"sum of odd no is"<<sum1<<endl;
{for {i=2;i<=100;i=i+2)
sum2=sum2+i;}
cout<<"sum of even no is"<<sum2;
}
- 1 decade ago
sum of odd and even.
even=0,odd=0
for(i=1,i<=100, i++)
{
if i mod 2 =0 // even num
then even=even+i
else odd=odd+i}
print even,odd
multiplication(b*a)
mul=0;
while(i<=a)
{
mul=mul+b;
}
print mul.