answersLogoWhite

0

Still curious? Ask our experts.

Chat with our AI personalities

ReneRene
Change my mind. I dare you.
Chat with Rene
EzraEzra
Faith is not about having all the answers, but learning to ask the right questions.
Chat with Ezra
TaigaTaiga
Every great hero faces trials, and you—yes, YOU—are no exception!
Chat with Taiga

Add your answer:

Earn +20 pts
Q: WAP to print esquare 10 natural number?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Math & Arithmetic

Wap to take a number from the user and print its square if the number is even otherwise incase of odd number print its cube?

#include<iostream> using namespace std; int main(void) { int a; int b; { cout << "Please enter a number: "; cin >> a; b = a%2 == 0 ? a*a : a*a*a; cout << "The result is: " << b << endl; } return 0; } - - - //Alternative #include<iostream> #include<cmath>


WAP to enter temperature in centigrade Degree and convert it into Fahrenheit Degree using c?

# include # include { float centi;farha; clrscr( ); print f ("Enter the temp); scan f ("%f"&centi); farha(a*centi)3/5; print f("farhanhite=%2f"farhan); getch( ); }


Wap to represent a pascal triangle?

it's easy i am assuming you know programming as you are asking a question of a high standard. The formula for any number in the traingle is (r-1)!/[(c-1)!*(r-c)!] where r represents row number and c represents column number. Note:- '!' sign means factorial. Eg:- 5! = 5 x 4 x 3 x 2 x1.


How long has art existed?

400-500 years now for 2009 duby duby doo wap Phineas and ferb = Candice and perr y


Wap to test whether the given no is divisible by both 11 and 13?

First check if it is divisible by 13. You need to delete the last digit from the number, then subtract 9 times the deleted digit from the remaining number. If what is left is divisible by 13, then so is the original number. For example. 195 The last digit is 5 so we delete that. Now 9x5=45 and we must subtract that from 195 So we have 19-45=-26 which is clearly divisible by 13. Now for 11 you need another test. Alternately add and subtract the digits from left to right. (You can think of the first digit as being 'added' to zero.) If the result (including 0) is divisible by 11, the number is also. Example: to see whether 365167484 is divisible by 11, start by subtracting: [0+]3-6+5-1+6-7+4-8+4 = 0; therefore 365167484 is divisible by 11. If your numbers passes both the divisibility tests, for 11 and 13, then it is divisible by both.