[solved] – Question 74495

#include<stdio.h>
int main()
{
int n;
for(n = 7; n!=0; n–)
printf(“n = %d”, n–);
getchar();
return 0;
}

anyone tell the o/p ??

Expert Answer


[solved] – Question 74499

Write a program which reads an integer from input using pancakes = int(input()). If pancakes is more than 3, print out Yum! and if pancakes is not more than 3, print out Still hungry! instead.

Expert Answer


[solved] – Question 74500

Write a program to help you feed your friends at a party by doing some math about square pizzas. Assume the grader defines a string inputStr for you, which is a decimal string meaning the side length L of the pizza in cm. The area of the pizza should be computed using the formula A = L*L. Then, assuming that each person needs to eat 100 cm2 of pizza, compute the number of people it can feed, rounded down to the nearest integer.

Expert Answer


[solved] – Question 74543

Copy and paste your program and result screen shots. What would the following program print out?
#include <iostream>
using namespace std;
void f(const int a = 5)
{
std::out << a * 2 << “n”;
}
int a = 123;
int main()
{
f(1);
f(a);
int b = 3;
f(b);
int a = 4;
f(a);
f();
}

Expert Answer


[solved] – Question 7457

1.Using Prolog as the programming language for LOGIC, construct the relevant command to do the following tasks:-

a.Prolog Lists – A list is either empty or it is composed of a first element (head) and a tail, which is a list itself. In Prolog we represent the empty list by the atom [] and a non-empty list by a term [H|T] where H denotes the head and T denotes the tail.
(NOTE:- Given list MySenarai= [a,b,c,d,e,f, g, h] for the tasks listed below)

i.Find the last element of a list.
?-
Output:-

ii.Find the K’th element of a list. (K=5)
?-
Output:-

iii.Eliminate consecutive duplicates of list elements.
?-
Output:-

iv.Find the number of elements of a list.
?-
Output:-

v.Reverse a list.
?-
Output:-

vi.Find out whether a list is a palindrome.
?-
Output:-
vii.Duplicate the elements of a list.
?-
Output:-

viii.Drop every N’th element from a list. (N=3)
?-
Output:-

ix.Insert an element at a given position into a list. (element = zzz)
?-
Output:-

x.Extract a slice from a list. (I = 2; k = 5)
Given two indices, I and K, the slice is the list containing the elements between the I’th and K’th element of the original list (both limits included). Start counting the elements with 1
?-
Output:-

Expert Answer


[solved] – Question 74620

Make a parameter query thats allows the user to choose which birth month to display,. So when the use is prompted for birth month, they might type 3, for March, and only the records which have a Date of Birth (dd/mm/yyyy) in March, will display

Expert Answer


[solved] – Question 74621

Make a Update Query that will add the phrase “Free Champagne for this Preferred Guest” to the Comments field, but only if the guest stays for 8 yrs or more.

Expert Answer


[solved] – Question 74674

You are the data analyst on the project team building a data warehouse for an insurance company. List the possible data sources from which you will bring the data into your data warehouse. State your assumptions.

Expert Answer


[solved] – Question 74675

Every data structure in the data warehouse contains the time element. Explain this statement?

Expert Answer


[solved] – Question 74697

You are the data analyst on the project team building a data warehouse for an insurance company. List the possible data sources from which you will bring the data into your data warehouse. State your assumptions

Expert Answer