Just came across this question, felt worth sharing, so here
I want you to make a C/C++ program that for any positive
integer n will print all the positive integers from 1 up to
it and then back again!
Let's say n=5 I want the program to print: 1 2 3 4 5 4 3 2 1.
Too easy you say?
Okay then... You can ONLY USE:
1 for loop
1 printf/cout statement
2 integers( i and n)
and as many operations you want.
NO if statements, NO ternary operators, NO tables, NO
pointers, NO functions!
#define f(g,h) g##h
print f ("%d"f(var,10));}
wat would be the output??
Write a program to add the following
(Like up to any 12 no.s)
A marketing company wishes to construct a decision table to
decide how to treat clients according to three
characteristics: Gender, City Dweller, and age group: A
(under 30), B (between 30 and 60), C (over 60). The company
has four products (W, X, Y and Z) to test market. Product W
will appeal to female city dwellers. Product X will appeal
to young females. Product Y will appeal to Male middle aged
shoppers who do not live in cities. Product Z will appeal to
all but older females.
how compile time affects when we add additional header file
a number whose only prime factors are 2,3,5, and 7 is call
humble number,,write a program to find and display the nth
element in this sequence..
sample input : 2,3,4,11,12,13, and 100.. sample output : the
2nd humble number is 2,the 3rd humble number is 3,the 4th
humble number is ,the 11th humble number is 12, the 12th
humble number is 14, the 13th humble number is 15, the 100th
humble number is 450.