Study guides

☆☆

Q: How do you write twice the sum of t and 3?

Write your answer...

Submit

Still have questions?

Related questions

2 + s(t) -s

3*(t + 7) or 3t + 21

2t/12

(t+3)3 is already factored. Could write it as (t+3)(t+3)(t+3).

int count (const Tree *t) { int sum; if (!t) return 0; else sum=1; if (t->left) sum += count (t->left); if (t->right) sum += count (t->right); return sum; } advanced: int count (const Tree *t) { int sum= 0; while (t) { sum++; if (t->left) { if (t->right) sum += count (t->right); t = t->left; } else t = t->right; } return sum; }

int Nodes (Tree *t) { int sum= 0; if (t) { sum+=1; if (t->left) sum += Nodes (t->left); if (t->right) sum += Nodes (t->right); } return sum; }

Once, Twice, Three Times a Lady (song - the Commodores)

Use a template function to calculate the square of any value, then sum the squares. The following example demonstrates how to sum the squares of integers 3 and 5. #include<iostream> template <class T> T sq(T& value) { return( value*value ); } int main() { #using namespace std; int x=3, y=5; cout<<"The sum of "<<x<<" squared plus "<<y<<" squared is " <<sq(x)+sq(y)<<endl; return(0); }

16 + 49 = 65

8+t

#include<stdio.h> void main() { int n,t,sum=0; float fact=1; clrscr(); printf("enter the number"); scanf(%d",&n); t=n; while(t) { for(i=0;i<=t%10;i++) { fact=fact*i; } sum=sum+fact; fact=1; t=t/10; } if(n==sum) { printf("strong number"); } else { printf("not strong number"); } getch(); }

t(1) = a = 54 t(4) = a*r^3 = 2 t(4)/t(1) = r^3 = 2/54 = 1/27 and so r = 1/3 Then sum to infinity = a/(1 - r) = 54/(1 - 1/3) = 54/(2/3) = 81.

People also asked