answersLogoWhite

0

He was not sure if it was alive, so he got a stick to prod it with.

User Avatar

Wiki User

12y ago

What else can I help you with?

Continue Learning about Engineering

Three address code in compiler design?

prod=0; i=1; do { prod = prod +a[i] * b[i]; i=i+1; } while(i<=20);


What is strong number in C language?

Strong number is a number for which sum of factorials of the digits is equal to the given number. Eg: let us consider 145 where sum of factorials of the digits= 1!+4!+5!=1+24+120=145 i,e., the given number. c program for strong number is: #include<stdio.h> #include<conio.h> void main() { int sof=0,n,dn,ctr,prod,rem; printf("Enter the number\n"); scanf("%d",&n); dn=n; while(n!=0) { prod=1,ctr=1; rem=n%10; while(ctr<=rem) { prod=prod*ctr; ctr=ctr+1; } sof=sof+prod; n=n/10; } if(sof==dn) { printf("The number entered is strong number"); } else { printf("The number entered is not a strong number"); } } By Nagarjuna sri indu ECE, IBP.


What is strong number n Armstrong number in C language?

Strong number:-The sum of the factorials of digits of a number is equal to the original number.Ex: n=145=> 1! + 4! + 5! = 1 + 24 + 120 = 145so it is strong number.Armstrong number:-The sum of the cubes of digits of a number is equal to the original number.Ex: n=153 => 13 + 53 +33 = 1+125+27= 153so 153 is arm strong number.C program for strong numbers#include#includevoid main(){int sof=0,n,dn,ctr,prod,rem;printf("Enter the number\n");scanf("%d",&n);dn=n;while(n!=0){prod=1,ctr=1;rem=n%10;while(ctr


Can you polyurethane a vinyl floor?

No, you can't. It would peel off like sunburned skin, if it ever even set up. And why in the world would you want to do that anyway? Yes you can; http://www.nauticexpo.com/prod/polyflor-voyager-flooring/vinyl-floor-coverings-for-ship-31432-193520.html


Perform addition multiplication subtraction of 2-D array using Operator Overloading in C plus plus?

#include<iostream> #include<vector> #include<random> template<const size_t R, const size_t C> class Matrix { public: using row_type = int[C]; private: // attributes int m_data[R][C]; public: // construction/assignment Matrix (); Matrix (const Matrix& source); Matrix (Matrix&& source); Matrix& operator= (const Matrix<R,C>& source); Matrix& operator= (Matrix<R,C>&& source); ~Matrix () {} public: // accessors row_type& row (const size_t index) { return m_data[index]; } const row_type& row (const size_t index) const { return m_data[index]; } row_type& operator[] (const size_t index) { return m_data[index]; } const row_type& operator[] (const size_t index) const { return m_data[index]; } size_t size() const { return R * C; } size_t rows() const { return R; } size_t cols() const { return C; } public: // operations Matrix<R,C>& operator+= (const Matrix<R,C>&); Matrix<R,C>& operator-= (const Matrix<R,C>&); }; template<const size_t R, const size_t C> Matrix<R,C>::Matrix() { for (size_t row=0; row<R; ++row) for (size_t col=0; col<C; ++col) m_data[row][col] = 0; } template<const size_t R, const size_t C> Matrix<R,C>::Matrix(const Matrix<R,C>& source) { for (size_t row=0; row<R; ++row) for (size_t col=0; col<C; ++col) m_data[row][col] = source.m_data[row][col]; } template<const size_t R, const size_t C> Matrix<R,C>::Matrix(Matrix<R,C>&& source) { for (size_t row=0; row<R; ++row) for (size_t col=0; col<C; ++col) m_data[row][col] = std::move (source.m_data[row][col]); } template<const size_t R, const size_t C> Matrix<R,C>& Matrix<R,C>::operator= (const Matrix<R,C>& source) { for (size_t row=0; row<R; ++row) for (size_t col=0; col<C; ++col) m_data[row][col] = source.m_data[row][col]; return *this; } template<const size_t R, const size_t C> Matrix<R,C>& Matrix<R,C>::operator= (Matrix<R,C>&& source) { for (size_t row=0; row<R; ++row) for (size_t col=0; col<C; ++col) m_data[row][col] = std::move (source.m_data[row][col]); return *this; } template<const size_t R, const size_t C> Matrix<R,C>& Matrix<R,C>::operator+= (const Matrix<R,C>& rhs) { for (size_t row=0; row<R; ++row) for (size_t col=0; col<C; ++col) m_data[row][col] += rhs.m_data[row][col]; return *this; } template<const size_t R, const size_t C> Matrix<R,C>& Matrix<R,C>::operator-= (const Matrix<R,C>& rhs) { for (size_t row=0; row<R; ++row) for (size_t col=0; col<C; ++col) m_data[row][col] -= rhs.m_data[row][col]; return *this; } template<const size_t R, const size_t C> Matrix<R,C> operator+ (const Matrix<R,C>& lhs, const Matrix<R,C>& rhs) { Matrix<R,C> sum (lhs); return sum += rhs; } template<const size_t R, const size_t C> Matrix<R,C> operator- (const Matrix<R,C>& lhs, const Matrix<R,C>& rhs) { Matrix<R,C> sub (lhs); return sub -= rhs; } template<const size_t R, const size_t C, const size_t R1, const size_t C1> Matrix<R,C1> operator* (const Matrix<R,C>& lhs, const Matrix<R1,C1>& rhs) { static_assert (C==R1, "Matrix dimension mismatch!"); Matrix<R,C1> mul; for (size_t x=0; x!=R; ++x) { for (size_t y=0; y!=C1; ++y) { int prod = 0; for (size_t z=0; z!=C; ++z) { prod += lhs[x][z] * rhs[z][y]; } mul[x][y] = prod; } } return mul; } template<const size_t R, const size_t C> std::ostream& operator<< (std::ostream& os, const Matrix<R,C>& m) { for (size_t row=0; row<R; ++row) { for (size_t col=0; col<C; ++col) { std::cout << m[row][col] << '\t'; } std::cout << std::endl; } return os; } int main() { std::default_random_engine generator; std::uniform_int_distribution<int> distribution (1,9); const size_t rows = 2; const size_t cols = 3; Matrix<rows, cols> a, b; for (size_t row=0; row<rows; ++row) { for (size_t col=0; col<cols; ++col) { a[row][col] = distribution (generator); b[row][col] = distribution (generator); } } std::cout << "Matrix a:\n\n" << a << '\n' << std::endl; std::cout << "Matrix b:\n\n" << b << '\n' << std::endl; std::cout << "Matrix a + b:\n\n" << a + b << '\n' << std::endl; std::cout << "Matrix a - b:\n\n" << a - b << '\n' << std::endl; Matrix<cols, rows> c; for (size_t row=0; row<rows; ++row) { for (size_t col=0; col<cols; ++col) { c[col][row] = distribution (generator); } } std::cout << "Matrix c:\n\n" << c << '\n' << std::endl; std::cout << "Matrix a * c:\n\n" << a * c << '\n' << std::endl; }

Related Questions

What is a sentence using Prod?

Prod me one more time and see what happens.


What is a good sentence with the word Prod?

Prod me not! I have to prod you every day to get you out of bed!


How do you use prod in a sentence?

"My wife has to prod me to take out the trash."


What is a sentence of prod?

To prod (and the noun for a poking) is to provoke by direct action. Example : "The father would have to prod his boys to finish their homework." Example : "After a prod from her friend, she agreed to go to the party."


A sentence with prod?

1. My friend would always prod me in class so one day I tattled to the teacher like the big baby that they'd said I am.2. Prod the ball past the post from 10 yards.3. You will feel when you meet a blockage and you should then prod the blockage with the rod.4: If you plod, I'll prod!


What is a name for a cattle prod?

Hot-shot, cattle prod, shock-prod, etc.


How do you solve a problem in compiler design?

prod=0; i=1; do { prod = prod +a[i] * b[i]; i=i+1; } while(i<=20);


What is an anagram of the word prod?

The anagram of prod is the word drop. It means to fall.


What is a sentence with the word impel?

To impel is to prod or urge someone to do something. Here are some sentences.I can't impel you to make the right decision, but I can ask you to.The weather will impel you to stay home today.He may impel you to vote for him.


What sentences can be made from word 'prod'?

Simply prod around your neck to find a sore point.


If the ratio of prod of 3 diff comps A B and C is 4 7 5 and of overall prod last yr was 4lac tones and if each comp had an increase of 20 percent in prod level this yr what is the prod of Comp B th?

2.1 L


What does the cowboy slang 'on the prod' mean?

Cowboys loved a colorful phrase! On the prod or proddy meant spoiling for a fight. A prod was what a cowboy used to spur cattle into moving more quickly.