can please someone teach me how to create this program using
while statement.. this is the output should look like
0
2
4
6
8
10
-thanks.. :) need it asap...
Answer Posted / manish soni bca 3rd year jaipu
#include<stdio.h>
#include<conio.h>
void main()
{
int cnt,term;
cnt=0;
while(cnt<6)
{
cnt+=1;
term=(cnt*2-1)^1;
printf("%d\n",term);
}
getch();
}
manish soni tagore biotech collage jaipur
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Is return a keyword in c?
What is the method to save data in stack data structure type?
How do I swap bytes?
If null and 0 are equivalent as null pointer constants, which should I use?
What is methods in c?
How many identifiers are there in c?
What is double pointer?
Is c dynamically typed?
What is an example of structure?
Write a program with dynamically allocation of variable.
You have given 2 array. You need to find whether they will
create the same BST or not.
For example:
Array1:10 5 20 15 30
Array2:10 20 15 30 5
Result: True
Array1:10 5 20 15 30
Array2:10 15 20 30 5
Result: False
One Approach is Pretty Clear by creating BST O(nlogn) then
checking two tree for identical O(N) overall O(nlogn) ..we
need there exist O(N) Time & O(1) Space also without extra
space .Algorithm ??
DevoCoder
guest
Posted 3 months ago #
#define true 1
#define false 0
int check(int a1[],int a2[],int n1,int n2)
{
int i;
//n1 size of array a1[] and n2 size of a2[]
if(n1!=n2) return false;
//n1 and n2 must be same
for(i=0;i
hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...
Find duplicates in a file containing 6 digit number (like uid) in O (n) time.
How can I copy just a portion of a string?
how we can make 3d venturing graphics on outer interface