write a c program, using for loop, that accepts and odds two
numbers. The output must be the sum and the addens. This
should be repeated 5 times while the first number is
decremented by one and the second number is incremented by 1.
Answers were Sorted based on User's Feedback
Answer / ankur srivastava
#include<stdio.h>
void main()
{int a,b,m=1;
printf("enter the two no\n");
scanf("%d %d",&a,&b);
while(m<=5)
{
printf("sum of %d and %d is %d \n",a,b,(a-- + b++));
m++;
}
}
Is This Answer Correct ? | 25 Yes | 7 No |
Answer / sravan
#include<stdio.h>
void main()
{int a,b,m=1;
printf("enter the two no\n");
scanf("%d %d",&a,&b);
while(m<=5)
{
printf("sum of %d and %d is %d \n",a,b,(a-- + b++));
m++;
}
}
Is This Answer Correct ? | 10 Yes | 7 No |
Deriving time complexity of Binary tree and AVL tree, step by step.
program to find the magic square using array
1. Write a program using one dimensional array that calculates the sum and average of the five input values from the keyboard and prints the calculated sum and average.
i really need help about this.. write a program to display the set of odd and even numbers separately. find the highest and lowest value of the given numbers.
void main() { int i,j=2; for(i=0;i<3;i++) if(j=i) cout<<"Lotus "; else cout<<"Rose "; } Its result is Rose Lotus Lotus.. How? Explain it?
swap prog
using friend function find the maximum number from given two numbers from two different classes.write all necessary functions and constructor for the classes.
how to diplay a external image of output on winxp by using c & c++,
write a function that allocates memory for a single data type passed as a parameter.the function uses the new operator and return a pointer to the allocated memory.the function must catch and handle any exception during allocation
Min-Max Write an algorithm that finds both the smallest and largest numbers in a list of n numbers and with complexity T(n) is at most about (1.5)n comparisons.
10 Answers ABC, College School Exams Tests, ITC Infotech, Kyambogo University, Qatar University,
Code for Easily Using Hash Table?
Write code for the multiplication of COMPLEX numbers?