write a program print that pattern by while statement
+*+*+*+
*+*+*+*
+*+*+*+
*+*+*+*
#include"stdio.h"
|
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()
|
what is output ,, val = 316 :
#include"stdio.h"
main()
{
long val, sum=0, n;
|
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;
|
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;);
|
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 »
|
#include"stdio.h" main() { int val, max, min, i; printf("enter value 1 : "); scanf("%d", &val); max=val; for(i=2;i<=5;i++){ printf("enter value %d : ", i); scanf("%d", &val); if(val>max){ max=val; } else if(val<min){ min=val; } &nb
...
Read more »
|
printf("enter z and n : ");
|
|