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 |
write a program that can locate elements in array.
develop a program to calculate and print body mass index for 200 employees
0 Answers Jomo Kenyatta University,
readers and writers problem
Ask the user to input three positive integers M, N and q. Make the 2 dimensional array of integers with size MxN, where all the elements of I (I = 1,…,M) line will be members of geometrical progression with first element equal to the number of line (I) and denominator q.
Given 1 to n distinct random number of which n+1th element was duplicated. How do find the duplicate element and explain the time complexity of the algorithm.
program to find the magic square using array
how to take time as input in the format (12:02:13) from user so that controls remains between these columns?
what is the use of using for loop as "for(;;)"?
Counting in Lojban, an artificial language developed over the last fourty years, is easier than in most languages The numbers from zero to nine are: 0 no 1 pa 2 re 3 ci 4 vo 5 mk 6 xa 7 ze 8 bi 9 so Larger numbers are created by gluing the digit togather. For Examle 123 is pareci Write a program that reads in a lojban string(representing a no less than or equal to 1,000,000) and output it in numbers.
Write a program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors.
3 Answers TCS, Vimukti Technologies, Wipro,
write a program that prompt the user to enter his height and weight,then calculate the body mass index and show the algorithm used
0 Answers Jomo Kenyatta University,
Wrie a function which returns the most frequent number in a list of integers. Handle the case of more than one number which meets this criterion. public static int[] GetFrequency(int[] list)