write a program print that pattern by while statement
+*+*+*+
*+*+*+*
+*+*+*+
*+*+*+*
#include"stdio.h"
...
Read more »
|
write a program that reads value of x and compute the value of y from the following equation
y = -x + x^2 - x^3 + x^4
#include"stdio.h"
int p(int m, int n);
main()
...
Read more »
|
|
write a program that reads a sequence of integers when a negative number is read that many asterisk are to print ,, when a positive number is read that the factorial of the number is to be printed
#include<stdio.h>
main()
{
int i, n, val, j, fact;
...
Read more »
|
write a program perform the addition, subtraction, division or multiplication ,, the inputs to the program are two float values and arithmetic operator .use
1- if-else
2- switch
if-else :
#include<stdio.h>
|
write a program that read n integer values and pass them one at a time to a function called evenodd to determine if value is even or odd ,, also another function called negative to determine if value is positive or negative
#include<stdio.h>
void evenodd(int x;);
void negative(int y;);
...
Read more »
|
write a program using while statement and conditional operator to read n integer values and calculate
1- number and sum of odd values
2- number and sum of even values
#include<stdio.h> main() { int val, n, i=1, odd=0, even=0, odds=0, evens=0; ... Read more » |
|
|