“I bought this guide a few days ago to prepare for my interview with Oracle. Many of the questions they asked me were from this guide. I found this book absolutely great!”
Write a program that reads a positive integer N and then prints an “N times table” containing values up to N * N.
For example, if program reads the value 5, it should pront
5 * 1 = 5
5 * 2 = 10
5 * 3 = 15
5 * 4 = 20
5 * 5 = 25
#include
#include
void main()
{ int i,j,a;
clrscr();
printf(”enter the your numbers”);
scanf(”%d%d”,&i,&j);
{for(i=0;i=n;i++)
{for(j=0;j=i;j++)
a=i*j;
}
printf(”the result value a”)
get ch();
This is the code in C lang
#include
main()
{
int n,n1,i;
printf(”enter the value of n”);
scanf(”%d”,&n);
for(i=1;i
hmm the inequality sign doesn’t work here…
void timesTable(unsigned n)
{
for (int i = 0; i
#include
#include
main()
{
int i,n,n1;
printf(”enter your value of n:”);
scanf(”%d”,&n);
for(i=1;i
#include
#include
using namespace std;
void printTable(int N)
{
for(int i=1; i>N;
printTable(N);
return 0;
}
int main()
{
int n;
scanf(”%d\n”, &n);
for (int i=1; i
#include
using namespace std;
int main()
{ char c;
int num;
int prod;
int i;
cout>num;
for(i=1;i>c;
return 0;
}
#include
#include
void main()
{
int i,n,a=1;
clrscr();
printf(”\n\n\t\tENTER THE NUMBER=”);
scanf(”%d”,&n);
for(i=1;i
#include
main()
{
int a;
scanf(”%d”,&a);
for(i=0;i
#include
using namespace std;
int main(int argc,char *argv[]){
int n = atoi(argv[1]);
for(int i = 1; i
// Function for Printing N’s table
int N = 0;
cin>>N;
getTable(N);
getTable(int N)
{
for(int i=1; i
void PrintTimesTable(int n)
{
int result = 0;
for(int i = 1; i
#include
#include
void main()
{ int i,j,a;
clrscr();
printf(”enter the your numbers”);
scanf(”%d%d”,&i,&j);
{for(i=0;i=n;i++)
{for(j=0;j=i;j++)
a=i*j;
}
printf(”the result value a”)
get ch();
Leave an Answer/Comment